aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWendy Cheng <wcheng@redhat.com>2007-02-23 00:21:17 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2007-03-07 13:57:34 -0500
commita7d2b2bdc9a0b55d5b08e15756c7e65c48c4bca5 (patch)
treed3f76ffff0bf5798bc29bbff0f62998d95de0d95 /fs
parentd5a6751b32c79680da90eaa76919ffe6e5b8a94f (diff)
[GFS2] NFS filehandle check
File handle checking error found in '07 NFS connectathon. The fh_type and fh_len are not necessarily identical. Some of the client machines could fail mount with stale filehandle without this patch. Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_export.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index 1de05b63d43a..aad918337a46 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -38,14 +38,11 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
38 struct gfs2_fh_obj fh_obj; 38 struct gfs2_fh_obj fh_obj;
39 struct gfs2_inum_host *this, parent; 39 struct gfs2_inum_host *this, parent;
40 40
41 if (fh_type != fh_len)
42 return NULL;
43
44 this = &fh_obj.this; 41 this = &fh_obj.this;
45 fh_obj.imode = DT_UNKNOWN; 42 fh_obj.imode = DT_UNKNOWN;
46 memset(&parent, 0, sizeof(struct gfs2_inum)); 43 memset(&parent, 0, sizeof(struct gfs2_inum));
47 44
48 switch (fh_type) { 45 switch (fh_len) {
49 case GFS2_LARGE_FH_SIZE: 46 case GFS2_LARGE_FH_SIZE:
50 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; 47 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
51 parent.no_formal_ino |= be32_to_cpu(fh[5]); 48 parent.no_formal_ino |= be32_to_cpu(fh[5]);