diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-11-19 19:08:46 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-19 19:08:46 -0800 |
commit | 56495a2442a47d0ea752db62434913b3346fe5a5 (patch) | |
tree | 35284af165304f4fe47f0214a48a8708f76a0d28 /fs/gfs2/bmap.c | |
parent | 657bc1d10bfc23ac06d5d687ce45826c760744f9 (diff) | |
parent | 4d02da974ea85a62074efedf354e82778f910d82 (diff) |
Merge https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 8dff9cbd0a87..62d9081d1e26 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1301,12 +1301,8 @@ int gfs2_block_map(struct inode *inode, sector_t lblock, trace_gfs2_bmap(ip, bh_map, lblock, create, 1); ret = gfs2_iomap_get(inode, pos, length, flags, &iomap, &mp); - if (!ret && iomap.type == IOMAP_HOLE) { - if (create) - ret = gfs2_iomap_alloc(inode, &iomap, &mp); - else - ret = -ENODATA; - } + if (create && !ret && iomap.type == IOMAP_HOLE) + ret = gfs2_iomap_alloc(inode, &iomap, &mp); release_metapath(&mp); if (ret) goto out; |