From: Christoph Hellwig <hch@lst.de>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Christoph Hellwig <hch@lst.de>, Philippe Troin <phil@fifi.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] nfs: only show Posix ACLs in listxattr if actually present
Date: Wed, 18 Jun 2014 15:00:22 +0200 [thread overview]
Message-ID: <20140618130022.GA32043@lst.de> (raw)
In-Reply-To: <CAHQdGtSBN4_MPVUWZ1dhOAXyp9w++YGYLP9fmYNq5RPqzrDwPA@mail.gmail.com>
On Wed, Jun 18, 2014 at 07:35:27AM -0400, Trond Myklebust wrote:
> Hi Christoph,
>
> On Wed, Jun 18, 2014 at 5:07 AM, Christoph Hellwig <hch@lst.de> wrote:
> > The big ACL switched nfs to use generic_listxattr, which calls all existing
> > ->list handlers. Add a custom .listxattr implementation that only lists
> > the ACLs if they actually are present on the given inode.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reported-by: Philippe Troin <phil@fifi.org>
> > Tested-by: Philippe Troin <phil@fifi.org>
> > ---
> > fs/nfs/nfs3acl.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> > fs/nfs/nfs3proc.c | 4 ++--
> > 2 files changed, 45 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
> > index 871d6ed..8f854dd 100644
> > --- a/fs/nfs/nfs3acl.c
> > +++ b/fs/nfs/nfs3acl.c
> > @@ -247,3 +247,46 @@ const struct xattr_handler *nfs3_xattr_handlers[] = {
> > &posix_acl_default_xattr_handler,
> > NULL,
> > };
> > +
> > +static int
> > +nfs3_list_one_acl(struct inode *inode, int type, const char *name, void *data,
> > + size_t size, ssize_t *result)
>
> Why do you make 'result' a pointer to ssize_t rather than a size_t here?
Because ->listxattr returns a ssize_t, and it points to the variable used
as return value of nfs3_listxattr.
next prev parent reply other threads:[~2014-06-18 13:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 9:07 [PATCH] nfs: only show Posix ACLs in listxattr if actually present Christoph Hellwig
2014-06-18 11:35 ` Trond Myklebust
2014-06-18 13:00 ` Christoph Hellwig [this message]
2014-07-08 15:27 ` Philippe Troin
[not found] ` <CAHQdGtSgH1tz7cFtLthOvkrvH_RdybA2ezsCq1Y3z_xVoB8k5w@mail.gmail.com>
2014-07-08 19:01 ` Trond Myklebust
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=20140618130022.GA32043@lst.de \
--to=hch@lst.de \
--cc=linux-nfs@vger.kernel.org \
--cc=phil@fifi.org \
--cc=trond.myklebust@primarydata.com \
/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.