From: Andreas Gruenbacher <agruenba@redhat.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH] nfs: Fix listxattr regression (2)
Date: Fri, 11 Dec 2015 16:14:19 +0100 [thread overview]
Message-ID: <1449846859-19375-1-git-send-email-agruenba@redhat.com> (raw)
In-Reply-To: <CAHc6FU6TpP76Dh=Vc9L4j4VPXHwTaRjF6p=LE6V5YNZQdV-9JA@mail.gmail.com>
Al,
here is another fix for the same botched nfs commit. Could you please
also merge / fold that? Sorry for the mess.
Thanks,
Andreas
--
Fix another regression introduced in d77ae742: listxattr ended up always
failing with -ERANGE on NFSv4.2 mounts with security label support.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/nfs/nfs4proc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e9db118..c57d133 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6296,8 +6296,8 @@ nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
int len = 0;
if (nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL)) {
- len = security_inode_listsecurity(inode, list, len);
- if (len > list_len)
+ len = security_inode_listsecurity(inode, list, list_len);
+ if (list_len && len > list_len)
return -ERANGE;
}
return len;
--
2.5.0
next prev parent reply other threads:[~2015-12-11 15:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 12:15 [PATCH] nfs: Fix listxattr regression Andreas Gruenbacher
2015-12-11 12:55 ` Al Viro
2015-12-11 13:09 ` Andreas Gruenbacher
2015-12-11 15:14 ` Andreas Gruenbacher [this message]
2015-12-11 16:09 ` [PATCH] nfs: Fix listxattr regression (2) Andreas Gruenbacher
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=1449846859-19375-1-git-send-email-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 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).