diff options
author | Chao Yu <yuchao0@huawei.com> | 2018-02-26 22:04:13 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-03-13 08:05:48 +0900 |
commit | 846ae671ad368e344a2b141c0f19e1014b27a0dd (patch) | |
tree | b220f05ab079e37343b841d368a58916388149ab /fs/f2fs/file.c | |
parent | 17cd07ae95073c298af92c1ba14ac58ce84de33b (diff) | |
download | linux-846ae671ad368e344a2b141c0f19e1014b27a0dd.tar.bz2 |
f2fs: expose extension_list sysfs entry
This patch adds a sysfs entry 'extension_list' to support
query/add/del item in extension list.
Query:
cat /sys/fs/f2fs/<device>/extension_list
Add:
echo 'extension' > /sys/fs/f2fs/<device>/extension_list
Del:
echo '!extension' > /sys/fs/f2fs/<device>/extension_list
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index db9dc9efafae..c0a80987e88e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1970,7 +1970,7 @@ static int f2fs_ioc_get_encryption_pwsalt(struct file *filp, unsigned long arg) if (err) return err; - mutex_lock(&sbi->sb_lock); + down_write(&sbi->sb_lock); if (uuid_is_nonzero(sbi->raw_super->encrypt_pw_salt)) goto got_it; @@ -1989,7 +1989,7 @@ got_it: 16)) err = -EFAULT; out_err: - mutex_unlock(&sbi->sb_lock); + up_write(&sbi->sb_lock); mnt_drop_write_file(filp); return err; } |