f2fs: fix wrong return value of f2fs_bmap_compress()
authorChao Yu <yuchao0@huawei.com>
Sun, 28 Jun 2020 12:29:38 +0000 (20:29 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 8 Jul 2020 04:51:46 +0000 (21:51 -0700)
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>
fs/f2fs/data.c

index dfd3225..91dc7b5 100644 (file)
@@ -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
 }