diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-12-09 21:25:43 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-12-14 22:17:48 +0300 |
commit | 19bdba5265624ba6b9d9dd936a0c6ccc167cfe80 (patch) | |
tree | f42c4b1098ac55edd11e32cc816fc7beb2bfb933 /fs/f2fs/file.c | |
parent | 325163e9892b627fc9fb1af51e51f0f95dded517 (diff) | |
download | linux-19bdba5265624ba6b9d9dd936a0c6ccc167cfe80.tar.xz |
f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file
Android OTA failed due to SBI_NEED_FSCK flag when pinning the file. Let's avoid
it since we can do in-place-updates.
Cc: stable@vger.kernel.org
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index a15f8ba239f0..5ec6bef3937f 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3145,17 +3145,17 @@ static int f2fs_ioc_set_pin_file(struct file *filp, unsigned long arg) inode_lock(inode); - if (f2fs_should_update_outplace(inode, NULL)) { - ret = -EINVAL; - goto out; - } - if (!pin) { clear_inode_flag(inode, FI_PIN_FILE); f2fs_i_gc_failures_write(inode, 0); goto done; } + if (f2fs_should_update_outplace(inode, NULL)) { + ret = -EINVAL; + goto out; + } + if (f2fs_pin_file_control(inode, false)) { ret = -EAGAIN; goto out; |