diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 58f692b568b2..d2b4145cb34e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1726,8 +1726,10 @@ static int f2fs_ioc_commit_atomic_write(struct file *filp) down_write(&F2FS_I(inode)->dio_rwsem[WRITE]); - if (f2fs_is_volatile_file(inode)) + if (f2fs_is_volatile_file(inode)) { + ret = -EINVAL; goto err_out; + } if (f2fs_is_atomic_file(inode)) { ret = commit_inmem_pages(inode);