mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
f2fs: don't allow volatile writes for non-regular file
Now f2fs only supports volatile writes for journal db regular file. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
e811898c97
commit
8ff0971f15
@ -1598,6 +1598,9 @@ static int f2fs_ioc_start_volatile_write(struct file *filp)
|
||||
if (!inode_owner_or_capable(inode))
|
||||
return -EACCES;
|
||||
|
||||
if (!S_ISREG(inode->i_mode))
|
||||
return -EINVAL;
|
||||
|
||||
ret = mnt_want_write_file(filp);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user