Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1239045
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Christoph Hellwig <hch@infradead.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 6/7] squashfs: xattr simplifications |
| Date | Sun, 04 Oct 2015 08:30:01 +0200 |
| Message-ID | <qfKY1-FS-9@gated-at.bofh.it> (permalink) |
| References | <qbuRP-5fA-3@gated-at.bofh.it> <qbuRQ-5fA-17@gated-at.bofh.it> |
| X-Original-To | Andreas Gruenbacher <agruenba@redhat.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Srs-Rewrite | SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org See http://www.infradead.org/rpr.html |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Alexander Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@infradead.org>, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Phillip Lougher <phillip@squashfs.org.uk> |
| X-Original-Date | Sat, 3 Oct 2015 23:29:06 -0700 |
| X-Original-Message-ID | <20151004062906.GE28519@infradead.org> |
| X-Original-References | <1442924812-9384-1-git-send-email-agruenba@redhat.com> <1442924812-9384-7-git-send-email-agruenba@redhat.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1239045 |
Show key headers only | View raw
On Tue, Sep 22, 2015 at 02:26:51PM +0200, Andreas Gruenbacher wrote:
> Now that the xattr handler is passed to the xattr handler operations, we
> have access to the attribute name prefix, so simplify the squashfs xattr
> handlers a bit.
>
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> ---
> fs/squashfs/xattr.c | 90 ++++++++++++++++++-----------------------------------
> 1 file changed, 31 insertions(+), 59 deletions(-)
>
> diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
> index 4ae1e4f..6a4cc34 100644
> --- a/fs/squashfs/xattr.c
> +++ b/fs/squashfs/xattr.c
> @@ -212,96 +212,68 @@ failed:
> }
>
>
> -/*
> - * User namespace support
> - */
> -static size_t squashfs_user_list(const struct xattr_handler *handler,
> - struct dentry *d, char *list, size_t list_size,
> - const char *name, size_t name_len)
> +static size_t squashfs_xattr_handler_list(const struct xattr_handler *handler,
> + struct dentry *d, char *list,
> + size_t list_size, const char *name,
> + size_t name_len)
> {
> - if (list && XATTR_USER_PREFIX_LEN <= list_size)
> - memcpy(list, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN);
> - return XATTR_USER_PREFIX_LEN;
> + int len = strlen(handler->prefix);
> +
> + if (list && len <= list_size)
> + memcpy(list, handler->prefix, len);
> + return len;
IS it just me or is this handler broke before and after this patch? It
only copies out the prefix, but not the actual xattr name.
--
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 v2 6/7] squashfs: xattr simplifications Andreas Gruenbacher <agruenba@redhat.com> - 2015-09-22 14:30 +0200
Re: [PATCH v2 6/7] squashfs: xattr simplifications Christoph Hellwig <hch@infradead.org> - 2015-10-04 08:30 +0200
Re: [PATCH v2 6/7] squashfs: xattr simplifications Andreas Grünbacher <andreas.gruenbacher@gmail.com> - 2015-10-04 15:20 +0200
csiph-web