summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/export.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-06-05 21:25:36 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2020-06-05 21:25:36 +0200
commit300e549b6e53025ea69550f009451f7a13bfc3eb (patch)
treeeee0b51761392f1dbf9435cadb267d4616eff000 /fs/gfs2/export.c
parentgfs2: fix use-after-free on transaction ail lists (diff)
parentgfs2: Smarter iopen glock waiting (diff)
downloadlinux-300e549b6e53025ea69550f009451f7a13bfc3eb.tar.xz
linux-300e549b6e53025ea69550f009451f7a13bfc3eb.zip
Merge branch 'gfs2-iopen' into for-next
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);