diff options
author | Wendy Cheng <wcheng@redhat.com> | 2007-06-27 17:07:08 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-07-09 03:24:08 -0400 |
commit | bb9bcf061660661c57ddcf31337529f82414b937 (patch) | |
tree | 0876874e5252c4939b8e7bbd62a22a6eb4ad1abf /fs/gfs2/dir.c | |
parent | f4fadb23ca49abd2f1387a0b7e78b385ebc760ce (diff) |
[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>
Diffstat (limited to 'fs/gfs2/dir.c')
-rw-r--r-- | fs/gfs2/dir.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c index f793e31a050e..2beb2f401aa2 100644 --- a/fs/gfs2/dir.c +++ b/fs/gfs2/dir.c | |||
@@ -1498,9 +1498,10 @@ struct inode *gfs2_dir_search(struct inode *dir, const struct qstr *name) | |||
1498 | if (dent) { | 1498 | if (dent) { |
1499 | if (IS_ERR(dent)) | 1499 | if (IS_ERR(dent)) |
1500 | return ERR_PTR(PTR_ERR(dent)); | 1500 | return ERR_PTR(PTR_ERR(dent)); |
1501 | inode = gfs2_inode_lookup(dir->i_sb, | 1501 | inode = gfs2_inode_lookup(dir->i_sb, |
1502 | be64_to_cpu(dent->de_inum.no_addr), | 1502 | be16_to_cpu(dent->de_type), |
1503 | be16_to_cpu(dent->de_type)); | 1503 | be64_to_cpu(dent->de_inum.no_addr), |
1504 | be64_to_cpu(dent->de_inum.no_formal_ino)); | ||
1504 | brelse(bh); | 1505 | brelse(bh); |
1505 | return inode; | 1506 | return inode; |
1506 | } | 1507 | } |