2011-06-15 19:15:55

by Fred Isaman

[permalink] [raw]
Subject: [PATCH 1/1] nfs4.1: check for whole file layouts is comparing against uninitialized values

Signed-off-by: Fred Isaman <[email protected]>
---
fs/nfs/nfs4filelayout.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index 88aa8a0..7fe8e19 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -428,8 +428,8 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo,
dprintk("--> %s\n", __func__);

/* FIXME: remove this check when layout segment support is added */
- if (fl->generic_hdr.pls_range.offset != 0 ||
- fl->generic_hdr.pls_range.length != NFS4_MAX_UINT64) {
+ if (lgr->range.offset != 0 ||
+ lgr->range.length != NFS4_MAX_UINT64) {
dprintk("%s Only whole file layouts supported. Use MDS i/o\n",
__func__);
goto out;
--
1.7.2.1