diff mbox

ceph: Document that dentry is unused in xattr ->get

Message ID 1464175265-1339-1-git-send-email-agruenba@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andreas Gruenbacher May 25, 2016, 11:21 a.m. UTC
For consistency with the other filesystems, rename the dentry argument
to "unused" here.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/ceph/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton May 25, 2016, 1:56 p.m. UTC | #1
On Wed, 2016-05-25 at 13:21 +0200, Andreas Gruenbacher wrote:
> For consistency with the other filesystems, rename the dentry argument
> to "unused" here.
> 
> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
> ---
>  fs/ceph/xattr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
> index 0d66722..223f567 100644
> --- a/fs/ceph/xattr.c
> +++ b/fs/ceph/xattr.c
> @@ -1042,7 +1042,7 @@ out:
>  }
>  
>  static int ceph_get_xattr_handler(const struct xattr_handler *handler,
> -				  struct dentry *dentry, struct inode *inode,
> +				  struct dentry *unused, struct inode *inode,
>  				  const char *name, void *value, size_t size)
>  {
>  	if (!ceph_is_valid_xattr(name))

Acked-by: Jeff Layton <jlayton@poochiereds.net>

...that said, it'd be even better to just __always_unused attribute on
the variable. That gives the same hint to the compiler as well...
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 0d66722..223f567 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -1042,7 +1042,7 @@  out:
 }
 
 static int ceph_get_xattr_handler(const struct xattr_handler *handler,
-				  struct dentry *dentry, struct inode *inode,
+				  struct dentry *unused, struct inode *inode,
 				  const char *name, void *value, size_t size)
 {
 	if (!ceph_is_valid_xattr(name))