Skip to content

Commit 4194dec

Browse files
AstralBobAndreas Gruenbacher
authored andcommitted
gfs2: Fix I_NEW check in gfs2_dinode_in
Patch 4a378d8 added a new check for I_NEW inodes, but unfortunately it used the wrong variable, i_flags. This caused GFS2 to withdraw when gfs2_lookup_by_inum needed to refresh an I_NEW inode. This patch switches to use the correct variable, i_state. Fixes: 4a378d8 ("gfs2: be careful with inode refresh") Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 43a511c commit 4194dec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/gfs2/glops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf)
396396
struct timespec64 atime;
397397
u16 height, depth;
398398
umode_t mode = be32_to_cpu(str->di_mode);
399-
bool is_new = ip->i_inode.i_flags & I_NEW;
399+
bool is_new = ip->i_inode.i_state & I_NEW;
400400

401401
if (unlikely(ip->i_no_addr != be64_to_cpu(str->di_num.no_addr)))
402402
goto corrupt;

0 commit comments

Comments
 (0)