projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c242db
)
f2fs: don't allow atomic writes for not regular files
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Fri, 17 Mar 2017 02:04:15 +0000
(10:04 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 22 Mar 2017 02:34:17 +0000
(22:34 -0400)
The atomic writes only supports regular files for database.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index 3212dfa1a50ed56fe1c04e1da29c018520b4f028..2cf16ed5b74c8cc24909bb675e55e07008f0f19a 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-1518,6
+1518,9
@@
static int f2fs_ioc_start_atomic_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;