summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-06-28 20:29:38 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-07-07 21:51:46 -0700
commit250e84d725479914aa6f3feec1191c5f1ea3c057 (patch)
tree99c557d0fef57d4c5cfdfdaa1eaef5aa250d5c83 /fs
parentb815bdc7817d5a27410a33475f3401bd47f5854e (diff)
downloadlinux-250e84d725479914aa6f3feec1191c5f1ea3c057.tar.gz
linux-250e84d725479914aa6f3feec1191c5f1ea3c057.tar.bz2
linux-250e84d725479914aa6f3feec1191c5f1ea3c057.zip
f2fs: fix wrong return value of f2fs_bmap_compress()
If compression is disable, we should return zero rather than -EOPNOTSUPP to indicate f2fs_bmap() is not supported. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index dfd322515357..91dc7b598961 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -3703,10 +3703,9 @@ static sector_t f2fs_bmap_compress(struct inode *inode, sector_t block)
}
f2fs_put_dnode(&dn);
-
return blknr;
#else
- return -EOPNOTSUPP;
+ return 0;
#endif
}