[GFS2] Obtaining no_formal_ino from directory entry
GFS2 lookup code doesn't ask for inode shared glock. This implies during in-memory inode creation for existing file, GFS2 will not disk-read in the inode contents. This leaves no_formal_ino un-initialized during lookup time. The un-initialized no_formal_ino is subsequently encoded into file handle. Clients will get ESTALE error whenever it tries to access these files. Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:

committed by
Steven Whitehouse

parent
f4fadb23ca
commit
bb9bcf0616
@@ -860,18 +860,19 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked)
|
||||
{
|
||||
struct inode *inode;
|
||||
u32 goal = 0;
|
||||
u64 ino;
|
||||
u64 no_addr;
|
||||
|
||||
for(;;) {
|
||||
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
|
||||
GFS2_BLKST_UNLINKED);
|
||||
if (goal == 0)
|
||||
return 0;
|
||||
ino = goal + rgd->rd_data0;
|
||||
if (ino <= *last_unlinked)
|
||||
no_addr = goal + rgd->rd_data0;
|
||||
if (no_addr <= *last_unlinked)
|
||||
continue;
|
||||
*last_unlinked = ino;
|
||||
inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, ino, DT_UNKNOWN);
|
||||
*last_unlinked = no_addr;
|
||||
inode = gfs2_inode_lookup(rgd->rd_sbd->sd_vfs, DT_UNKNOWN,
|
||||
no_addr, 0);
|
||||
if (!IS_ERR(inode))
|
||||
return inode;
|
||||
}
|
||||
|
Reference in New Issue
Block a user