Skip to content

Commit c644af1

Browse files
Daeho JeongJaegeuk Kim
authored andcommitted
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 <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 2459306 commit c644af1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,8 @@ static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate)
20832083

20842084
inode_lock(inode);
20852085

2086-
if (!f2fs_disable_compressed_file(inode)) {
2086+
if (!f2fs_disable_compressed_file(inode) ||
2087+
f2fs_is_pinned_file(inode)) {
20872088
ret = -EINVAL;
20882089
goto out;
20892090
}

0 commit comments

Comments
 (0)