Skip to content

Commit

Permalink
f2fs: Fix uninitialized return in f2fs_ioc_shutdown()
Browse files Browse the repository at this point in the history
"ret" can be uninitialized on the success path when "in ==
F2FS_GOING_DOWN_FULLSYNC".

Fixes: 60b2b4ee2bc0 ("f2fs: Fix deadlock in shutdown ioctl")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: khusika <khusikadhamar@gmail.com>
  • Loading branch information
Dan Carpenter authored and khusika committed Oct 13, 2018
1 parent 25a740e commit 3fac0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg)
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct super_block *sb = sbi->sb;
__u32 in;
int ret;
int ret = 0;

if (!capable(CAP_SYS_ADMIN))
return -EPERM;
Expand Down

0 comments on commit 3fac0ad

Please sign in to comment.