Message ID | 20240311235921.1832684-1-daeho43@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c644af1332833a5baa2b6a9220d1a1d988352b26 |
Headers | show |
Series | [f2fs-dev,1/2] f2fs: prevent atomic write on pinned file | expand |
On 2024/3/12 7:59, Daeho Jeong wrote: > From: Daeho Jeong <daehojeong@google.com> > > 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> Thanks,
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Mon, 11 Mar 2024 16:59:19 -0700 you wrote: > From: Daeho Jeong <daehojeong@google.com> > > 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> > > [...] Here is the summary with links: - [f2fs-dev,1/2] f2fs: prevent atomic write on pinned file https://git.kernel.org/jaegeuk/f2fs/c/c644af133283 - [f2fs-dev,2/2] f2fs: prevent writing without fallocate() for pinned files (no matching commit) You are awesome, thank you!
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 1c044fb19c87..82277e95c88f 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2085,7 +2085,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; }