Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1289673
| From | Andreas Gruenbacher <agruenba@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] nfs: Fix listxattr regression (2) |
| Date | 2015-12-11 16:20 +0100 |
| Message-ID | <qExEe-6dr-25@gated-at.bofh.it> (permalink) |
| References | <qEuQ1-486-1@gated-at.bofh.it> <qEvsL-4sJ-23@gated-at.bofh.it> <qEvCq-4MO-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] nfs: Fix listxattr regression Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-11 13:20 +0100
Re: [PATCH] nfs: Fix listxattr regression Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-11 14:00 +0100
Re: [PATCH] nfs: Fix listxattr regression Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-11 14:10 +0100
[PATCH] nfs: Fix listxattr regression (2) Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-11 16:20 +0100
Re: [PATCH] nfs: Fix listxattr regression (2) Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-11 17:10 +0100
csiph-web