projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2459306
)
f2fs: prevent atomic write on pinned file
author
Daeho Jeong
<daehojeong@google.com>
Mon, 11 Mar 2024 23:59:19 +0000
(16:59 -0700)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Wed, 13 Mar 2024 01:25:18 +0000
(18:25 -0700)
Since atomic write way was changed to out-place-update, we should
prevent it on pinned files.
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
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 4dfe38e7313011523a5ce07bd6400610dd36841a..8a2a44ab3d32a1062a6ade09d1adfddcc2bbdaa0 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-2083,7
+2083,8
@@
static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate)
inode_lock(inode);
- if (!f2fs_disable_compressed_file(inode)) {
+ if (!f2fs_disable_compressed_file(inode) ||
+ f2fs_is_pinned_file(inode)) {
ret = -EINVAL;
goto out;
}