Three tiny clean-ups for 3.2
Subsystems (2)
cover Three tiny clean-ups for 3.2
I found these nits on the wayward journey to implementing client-side migration support.
---
Chuck Lever (3):
NFS: Remove no-op less-than-zero checks on unsigned variables.
NFS: Clean up nfs4_xdr_dec_secinfo()
NFS: Fix documenting comment for nfs_create_request()
fs/nfs/nfs4filelayout.c | 7 +++---- fs/nfs/nfs4xdr.c | 2 -- fs/nfs/pagelist.c | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-)
Signature · 1 line
Chuck Lever
PATCH 1/3 NFS: Fix documenting comment for nfs_create_request()
Clean up: the first parameter of nfs_create_request() has been incorrectly documented since time immemorial (OK, since before 2.6.12).
---
fs/nfs/pagelist.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nfs/pagelist.c +1 -1
@@ -41,7 +41,7 @@ nfs_page_free(struct nfs_page *p)/** * nfs_create_request - Create an NFS read/write request. -* @file: file descriptor to use +* @ctx: open context to use * @inode: inode to which the request is attached * @page: page to write * @offset: starting offset within the page for the write
PATCH 2/3 NFS: Clean up nfs4_xdr_dec_secinfo()
In reply to Chuck LeverClean up: Remove superfluous logic at the tail ofnfs4_xdr_dec_secinfo() .
Introduced by commit 5a5ea0d4 "NFS: Add secinfo procedure" (March 24, 2011).
---
fs/nfs/nfs4xdr.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
fs/nfs/nfs4xdr.c +0 -2
@@ -6602,8 +6602,6 @@ static int nfs4_xdr_dec_secinfo(struct rpc_rqst *rqstp,if (status) goto out; status =decode_secinfo (xdr, res); -if (status) - goto out; out:return status; }
PATCH 3/3 NFS: Remove no-op less-than-zero checks on unsigned variables.
In reply to Chuck LeverIntroduced by commit 16b374ca "NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure" (October 20, 2010).
---
fs/nfs/nfs4filelayout.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
fs/nfs/nfs4filelayout.c +3 -4
@@ -468,9 +468,8 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo, fl->dsaddr = dsaddr; -if (fl->first_stripe_index <0 || - fl->first_stripe_index >= dsaddr->stripe_count) { -dprintk ("%s Bad first_stripe_index %d\n" , +if (fl->first_stripe_index >= dsaddr->stripe_count) { +dprintk ("%s Bad first_stripe_index %u\n" , __func__, fl->first_stripe_index); goto out_put; }
@@ -571,7 +570,7 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo,/* Note that a zero value for num_fh is legal for STRIPE_SPARSE. * Futher checking is done in filelayout_check_layout */ -if (fl->num_fh <0 || fl->num_fh > +if (fl->num_fh >max (NFS4_PNFS_MAX_STRIPE_CNT ,NFS4_PNFS_MAX_MULTI_CNT )) goto out_err;