diff options
author | Daeho Jeong <daehojeong@google.com> | 2024-03-12 00:59:19 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-03-13 02:25:18 +0100 |
commit | c644af1332833a5baa2b6a9220d1a1d988352b26 (patch) | |
tree | 307f5daa6911d8701246a92b798b4dbec78ec20e /fs | |
parent | f2fs: fix to handle error paths of {new,change}_curseg() (diff) | |
download | linux-c644af1332833a5baa2b6a9220d1a1d988352b26.tar.xz linux-c644af1332833a5baa2b6a9220d1a1d988352b26.zip |
f2fs: prevent atomic write on pinned file
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 4dfe38e73130..8a2a44ab3d32 100644 --- 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; } |