Commit a7d2b2bd authored by Wendy Cheng's avatar Wendy Cheng Committed by Steven Whitehouse

[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: default avatarS. Wendy Cheng <wcheng@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent d5a6751b
......@@ -38,14 +38,11 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
struct gfs2_fh_obj fh_obj;
struct gfs2_inum_host *this, parent;
if (fh_type != fh_len)
return NULL;
this = &fh_obj.this;
fh_obj.imode = DT_UNKNOWN;
memset(&parent, 0, sizeof(struct gfs2_inum));
switch (fh_type) {
switch (fh_len) {
case GFS2_LARGE_FH_SIZE:
parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
parent.no_formal_ino |= be32_to_cpu(fh[5]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment