projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e811898
)
f2fs: don't allow volatile writes for non-regular file
author
Chao Yu
<yuchao0@huawei.com>
Fri, 17 Mar 2017 07:43:57 +0000
(15:43 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 22 Mar 2017 02:34:18 +0000
(22:34 -0400)
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>
fs/f2fs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index 2cf16ed5b74c8cc24909bb675e55e07008f0f19a..427ab1b41de3c6c05fc7203a33ebf5c15b0437a0 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-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;