From: Eric Anderle <eanderle@umich.edu>
To: bhalevy@panasas.com
Cc: "J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Subject: [PATCH] pnfsd: Add ability to clear pnfs dlm device ds list
Date: Thu, 17 Jun 2010 15:53:20 -0400 [thread overview]
Message-ID: <1276804400.1796.8.camel@Berlin> (raw)
Added the ability to clear the pnfs dlm device ds list. Before, we
checked to make sure the list wasn't empty; this is accomplished by
examining the character after the ':' in the passed-in string. By
modifying this check, an empty list is considered valid, and everything
just works.
---
fs/nfsd/nfs4pnfsdlm.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/fs/nfsd/nfs4pnfsdlm.c b/fs/nfsd/nfs4pnfsdlm.c
index 40f9b84..befec4f 100644
--- a/fs/nfsd/nfs4pnfsdlm.c
+++ b/fs/nfsd/nfs4pnfsdlm.c
@@ -160,17 +160,15 @@ nfsd4_set_pnfs_dlm_device(char *pnfs_dlm_device,
int len)
err = -EINVAL;
bufp += len + 1;
- if (bufp >= endp)
+ if (bufp > endp)
goto out_free;
/* data server list */
- /* FIXME: need to check for comma separated valid ip format */
len = strcspn(bufp, ":");
if (len > NFSD_DLM_DS_LIST_MAX)
goto out_free;
memcpy(new->ds_list, bufp, len);
-
/* validate the ips */
if (!nfsd4_validate_pnfs_dlm_device(new->ds_list,
&(new->num_ds)))
goto out_free;
--
1.7.0.4
next reply other threads:[~2010-06-17 19:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 19:53 Eric Anderle [this message]
2010-06-17 20:55 ` [PATCH] pnfsd: Add ability to clear pnfs dlm device ds list Benny Halevy
2010-06-17 21:06 ` Benny Halevy
2010-06-17 21:07 ` Benny Halevy
2010-06-17 21:17 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1276804400.1796.8.camel@Berlin \
--to=eanderle@umich.edu \
--cc=bfields@fieldses.org \
--cc=bhalevy@panasas.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.