commit | e811898c97f83aef6c1652fbfbf5294bf542159c | [log] [tgz] |
---|---|---|
author | Jaegeuk Kim <jaegeuk@kernel.org> | Fri Mar 17 10:04:15 2017 +0800 |
committer | Jaegeuk Kim <jaegeuk@kernel.org> | Tue Mar 21 22:34:17 2017 -0400 |
tree | d8d7b467de8a5635bd8ac4155052f7073ad8f28d | |
parent | 8c242db9b8c01b252290e23827163787f07e01d1 [diff] |
f2fs: don't allow atomic writes for not regular files The atomic writes only supports regular files for database. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 3212dfa..2cf16ed 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c
@@ -1518,6 +1518,9 @@ 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;