aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/export.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-01-15 05:31:38 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2020-06-05 20:19:21 +0200
commit6bdcadea75768bbd1cd8f6f13011978e1e19a53b (patch)
treecd730d2ff13c2b9f77f1473ebc2c8d8565fdd82c /fs/gfs2/export.c
parentgfs2: Try harder to delete inodes locally (diff)
downloadlinux-dev-6bdcadea75768bbd1cd8f6f13011978e1e19a53b.tar.xz
linux-dev-6bdcadea75768bbd1cd8f6f13011978e1e19a53b.zip
gfs2: Minor gfs2_lookup_by_inum cleanup
Use a zero no_formal_ino instead of a NULL pointer to indicate that any inode generation number will qualify: a valid inode never has a zero no_formal_ino. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/export.c')
-rw-r--r--fs/gfs2/export.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c
index 3f717285ee48..756d05779200 100644
--- a/fs/gfs2/export.c
+++ b/fs/gfs2/export.c
@@ -134,7 +134,9 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb,
struct gfs2_sbd *sdp = sb->s_fs_info;
struct inode *inode;
- inode = gfs2_lookup_by_inum(sdp, inum->no_addr, &inum->no_formal_ino,
+ if (!inum->no_formal_ino)
+ return ERR_PTR(-ESTALE);
+ inode = gfs2_lookup_by_inum(sdp, inum->no_addr, inum->no_formal_ino,
GFS2_BLKST_DINODE);
if (IS_ERR(inode))
return ERR_CAST(inode);