diff options
author | Chengguang Xu <cgxu519@mykernel.net> | 2021-01-13 08:21:54 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-01-28 02:20:06 +0300 |
commit | 6d1451bf7f84ea45035553ae566b3c91661d902b (patch) | |
tree | fba90e899514861853587a3d5d3d25ff41cc0a2e /fs/f2fs/data.c | |
parent | 3afae09ffea5e08f523823be99a784675995d6bb (diff) | |
download | linux-6d1451bf7f84ea45035553ae566b3c91661d902b.tar.xz |
f2fs: fix to use per-inode maxbytes
F2FS inode may have different max size, e.g. compressed file have
less blkaddr entries in all its direct-node blocks, result in being
with less max filesize. So change to use per-inode maxbytes.
Suggested-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c7bb07dd9a20..9aa458c01101 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3761,7 +3761,7 @@ static sector_t f2fs_bmap(struct address_space *mapping, sector_t block) filemap_write_and_wait(mapping); /* Block number less than F2FS MAX BLOCKS */ - if (unlikely(block >= F2FS_I_SB(inode)->max_file_blocks)) + if (unlikely(block >= max_file_blocks(inode))) goto out; if (f2fs_compressed_file(inode)) { |