Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1603091
| From | Chao Yu <yuchao0@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH RESEND] f2fs: don't allow volatile writes for non-regular file |
| Date | 2017-03-17 08:50 +0100 |
| Message-ID | <tlUO5-2W2-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Now f2fs only supports volatile writes for journal db regular file. Signed-off-by: Chao Yu <yuchao0@huawei.com> --- fs/f2fs/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index f64475a53ad8..f544a1648313 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1594,6 +1594,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; -- 2.8.2.295.g3f1c1d0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH RESEND] f2fs: don't allow volatile writes for non-regular file Chao Yu <yuchao0@huawei.com> - 2017-03-17 08:50 +0100
csiph-web