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; }