linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request()
  2011-09-26 15:29 [PATCH 0/3] Three tiny clean-ups for 3.2 Chuck Lever
@ 2011-09-26 15:29 ` Chuck Lever
  0 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2011-09-26 15:29 UTC (permalink / raw)
  To: linux-nfs; +Cc: bjschuma, andros

Clean up: the first parameter of nfs_create_request() has been
incorrectly documented since time immemorial (OK, since before
2.6.12).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/pagelist.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index b60970c..0a5ff5c 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 0/3] Three tiny clean-ups for 3.2 (repost)
@ 2011-10-25 16:17 Chuck Lever
  2011-10-25 16:17 ` [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request() Chuck Lever
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chuck Lever @ 2011-10-25 16:17 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

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(-)

-- 
Chuck Lever

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request()
  2011-10-25 16:17 [PATCH 0/3] Three tiny clean-ups for 3.2 (repost) Chuck Lever
@ 2011-10-25 16:17 ` Chuck Lever
  2011-10-25 16:17 ` [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo() Chuck Lever
  2011-10-25 16:18 ` [PATCH 3/3] NFS: Remove no-op less-than-zero checks on unsigned variables Chuck Lever
  2 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2011-10-25 16:17 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Clean up: the first parameter of nfs_create_request() has been
incorrectly documented since time immemorial (OK, since before
2.6.12).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/pagelist.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index b60970c..0a5ff5c 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo()
  2011-10-25 16:17 [PATCH 0/3] Three tiny clean-ups for 3.2 (repost) Chuck Lever
  2011-10-25 16:17 ` [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request() Chuck Lever
@ 2011-10-25 16:17 ` Chuck Lever
  2011-10-27 10:51   ` Bryan Schumaker
  2011-10-25 16:18 ` [PATCH 3/3] NFS: Remove no-op less-than-zero checks on unsigned variables Chuck Lever
  2 siblings, 1 reply; 6+ messages in thread
From: Chuck Lever @ 2011-10-25 16:17 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Clean up: Remove superfluous logic at the tail of
nfs4_xdr_dec_secinfo() .

Introduced by commit 5a5ea0d4 "NFS: Add secinfo procedure" (March 24,
2011).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/nfs4xdr.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 1dce12f..e6161b2 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -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;
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] NFS: Remove no-op less-than-zero checks on unsigned variables.
  2011-10-25 16:17 [PATCH 0/3] Three tiny clean-ups for 3.2 (repost) Chuck Lever
  2011-10-25 16:17 ` [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request() Chuck Lever
  2011-10-25 16:17 ` [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo() Chuck Lever
@ 2011-10-25 16:18 ` Chuck Lever
  2 siblings, 0 replies; 6+ messages in thread
From: Chuck Lever @ 2011-10-25 16:18 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

Introduced by commit 16b374ca "NFSv4.1: pnfs: filelayout: add driver's
LAYOUTGET and GETDEVICEINFO infrastructure" (October 20, 2010).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---

 fs/nfs/nfs4filelayout.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
index e8915d4..bbc5a21 100644
--- a/fs/nfs/nfs4filelayout.c
+++ b/fs/nfs/nfs4filelayout.c
@@ -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;
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo()
  2011-10-25 16:17 ` [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo() Chuck Lever
@ 2011-10-27 10:51   ` Bryan Schumaker
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan Schumaker @ 2011-10-27 10:51 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Trond.Myklebust, linux-nfs

On 10/25/2011 12:17 PM, Chuck Lever wrote:
> Clean up: Remove superfluous logic at the tail of
> nfs4_xdr_dec_secinfo() .

Oops.  Good catch!

- Bryan
> 
> Introduced by commit 5a5ea0d4 "NFS: Add secinfo procedure" (March 24,
> 2011).
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> 
>  fs/nfs/nfs4xdr.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
> index 1dce12f..e6161b2 100644
> --- a/fs/nfs/nfs4xdr.c
> +++ b/fs/nfs/nfs4xdr.c
> @@ -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;
>  }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-10-27 10:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 16:17 [PATCH 0/3] Three tiny clean-ups for 3.2 (repost) Chuck Lever
2011-10-25 16:17 ` [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request() Chuck Lever
2011-10-25 16:17 ` [PATCH 2/3] NFS: Clean up nfs4_xdr_dec_secinfo() Chuck Lever
2011-10-27 10:51   ` Bryan Schumaker
2011-10-25 16:18 ` [PATCH 3/3] NFS: Remove no-op less-than-zero checks on unsigned variables Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2011-09-26 15:29 [PATCH 0/3] Three tiny clean-ups for 3.2 Chuck Lever
2011-09-26 15:29 ` [PATCH 1/3] NFS: Fix documenting comment for nfs_create_request() Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).