linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruenba@redhat.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Steve French <sfrench@samba.org>,
	linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org,
	cluster-devel@redhat.com
Subject: [PATCH 7/8] posix acls: Export xattr_handler functions
Date: Thu, 14 Apr 2016 00:27:45 +0200	[thread overview]
Message-ID: <1460586466-5518-8-git-send-email-agruenba@redhat.com> (raw)
In-Reply-To: <1460586466-5518-1-git-send-email-agruenba@redhat.com>
In-Reply-To: <20160413182026.GR25498@ZenIV.linux.org.uk>

These functions are useful in filesystems like gfs2 which require
pre-/postamble code around xattr operations.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
---
 fs/posix_acl.c                  | 9 ++++++---
 include/linux/posix_acl_xattr.h | 8 ++++++++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 2c60f17..1da2c63 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -795,7 +795,7 @@ posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl,
 }
 EXPORT_SYMBOL (posix_acl_to_xattr);
 
-static int
+int
 posix_acl_xattr_get(const struct xattr_handler *handler,
 		    struct dentry *unused, struct inode *inode,
 		    const char *name, void *value, size_t size)
@@ -819,8 +819,9 @@ posix_acl_xattr_get(const struct xattr_handler *handler,
 
 	return error;
 }
+EXPORT_SYMBOL(posix_acl_xattr_get);
 
-static int
+int
 posix_acl_xattr_set(const struct xattr_handler *handler,
 		    struct dentry *dentry, const char *name,
 		    const void *value, size_t size, int flags)
@@ -856,12 +857,14 @@ out:
 	posix_acl_release(acl);
 	return ret;
 }
+EXPORT_SYMBOL(posix_acl_xattr_set);
 
-static bool
+bool
 posix_acl_xattr_list(struct dentry *dentry)
 {
 	return IS_POSIXACL(d_backing_inode(dentry));
 }
+EXPORT_SYMBOL(posix_acl_xattr_list);
 
 const struct xattr_handler posix_acl_access_xattr_handler = {
 	.name = XATTR_NAME_POSIX_ACL_ACCESS,
diff --git a/include/linux/posix_acl_xattr.h b/include/linux/posix_acl_xattr.h
index e5e8ec4..c92607c 100644
--- a/include/linux/posix_acl_xattr.h
+++ b/include/linux/posix_acl_xattr.h
@@ -65,6 +65,14 @@ struct posix_acl *posix_acl_from_xattr(struct user_namespace *user_ns,
 int posix_acl_to_xattr(struct user_namespace *user_ns,
 		       const struct posix_acl *acl, void *buffer, size_t size);
 
+int posix_acl_xattr_get(const struct xattr_handler *handler,
+			struct dentry *unused, struct inode *inode,
+			const char *name, void *value, size_t size);
+int posix_acl_xattr_set(const struct xattr_handler *handler,
+			struct dentry *dentry, const char *name,
+			const void *value, size_t size, int flags);
+bool posix_acl_xattr_list(struct dentry *dentry);
+
 extern const struct xattr_handler posix_acl_access_xattr_handler;
 extern const struct xattr_handler posix_acl_default_xattr_handler;
 
-- 
2.4.11


  parent reply	other threads:[~2016-04-13 22:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160413182026.GR25498@ZenIV.linux.org.uk>
2016-04-13 22:27 ` [PATCH 1/8] cifs: Fix xattr name checks Andreas Gruenbacher
2016-04-13 22:27 ` [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl Andreas Gruenbacher
2016-04-13 22:27 ` [PATCH 5/8] ceph: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:27 ` Andreas Gruenbacher [this message]
2016-04-13 22:27 ` [PATCH 8/8] gfs2: " Andreas Gruenbacher
     [not found] ` <20160413182026.GR25498-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-04-13 22:27   ` [PATCH] xattr: Export xattr_resolve_name Andreas Gruenbacher
     [not found]   ` <1460586466-5518-1-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-13 22:27     ` [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 6/8] ceph: kill __ceph_removexattr() Andreas Gruenbacher
2016-04-13 22:30   ` [PATCH] xattr: Export xattr_resolve_name Andreas Gruenbacher
     [not found]   ` <1460586620-5717-1-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-13 22:30     ` [PATCH 1/8] cifs: Fix xattr name checks Andreas Gruenbacher
     [not found]       ` <1460586620-5717-2-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-14  4:26         ` Steve French
     [not found]           ` <CAH2r5mumJ22+Q0bASFcXp5fK39Ubh+sznfOpVUtSJ94_c5gkxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-14  4:37             ` Al Viro
2016-04-14  4:43               ` Steve French
     [not found]                 ` <CAH2r5ms6USEO3a_EPUpgsnvTZgSHB2QqJnUnCSCQdFmvV0yPDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-14  4:49                   ` Steve French
2016-04-14  4:59                   ` Al Viro
     [not found]                     ` <20160414045920.GT25498-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-04-15  3:01                       ` Steve French
2016-04-13 22:30     ` [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs Andreas Gruenbacher
     [not found]       ` <1460586620-5717-4-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-14  4:27         ` Steve French
2016-04-13 22:30     ` [PATCH 8/8] gfs2: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:30 ` [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT Andreas Gruenbacher
2016-04-14  4:26   ` Steve French
2016-04-13 22:30 ` [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl Andreas Gruenbacher
2016-04-13 22:30 ` [PATCH 5/8] ceph: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:30 ` [PATCH 6/8] ceph: kill __ceph_removexattr() Andreas Gruenbacher
2016-04-13 22:30 ` [PATCH 7/8] posix acls: Export xattr_handler functions 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=1460586466-5518-8-git-send-email-agruenba@redhat.com \
    --to=agruenba@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=cluster-devel@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=sfrench@samba.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 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).