summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r--fs/f2fs/file.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 1f5892f38018..7f8ca47be0af 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1591,20 +1591,16 @@ static int f2fs_ioc_get_encryption_pwsalt(struct file *filp, unsigned long arg)
return err;
/* update superblock with uuid */
- lock_buffer(sbi->raw_super_buf);
generate_random_uuid(sbi->raw_super->encrypt_pw_salt);
- unlock_buffer(sbi->raw_super_buf);
err = f2fs_commit_super(sbi, false);
-
- mnt_drop_write_file(filp);
if (err) {
/* undo new data */
- lock_buffer(sbi->raw_super_buf);
memset(sbi->raw_super->encrypt_pw_salt, 0, 16);
- unlock_buffer(sbi->raw_super_buf);
+ mnt_drop_write_file(filp);
return err;
}
+ mnt_drop_write_file(filp);
got_it:
if (copy_to_user((__u8 __user *)arg, sbi->raw_super->encrypt_pw_salt,
16))