Skip to content

Commit

Permalink
f2fs: fix wrong return value of f2fs_bmap_compress()
Browse files Browse the repository at this point in the history
If compression is disable, we should return zero rather than -EOPNOTSUPP
to indicate f2fs_bmap() is not supported.

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
chaseyu authored and Jaegeuk Kim committed Jul 8, 2020
1 parent b815bdc commit 250e84d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 250e84d

Please sign in to comment.