Commit 695e3d60 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: llite: style changes in xattr.c

Small style changes to match more the kernel code standard
and it make it more readable.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183
Reviewed-on: https://review.whamcloud.com/27240Reviewed-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarSebastien Buisson <sbuisson@ddn.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e9b13740
...@@ -81,11 +81,10 @@ static int xattr_type_filter(struct ll_sb_info *sbi, ...@@ -81,11 +81,10 @@ static int xattr_type_filter(struct ll_sb_info *sbi,
return 0; return 0;
} }
static int static int ll_xattr_set_common(const struct xattr_handler *handler,
ll_xattr_set_common(const struct xattr_handler *handler, struct dentry *dentry, struct inode *inode,
struct dentry *dentry, struct inode *inode, const char *name, const void *value, size_t size,
const char *name, const void *value, size_t size, int flags)
int flags)
{ {
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
struct ptlrpc_request *req = NULL; struct ptlrpc_request *req = NULL;
...@@ -139,9 +138,9 @@ ll_xattr_set_common(const struct xattr_handler *handler, ...@@ -139,9 +138,9 @@ ll_xattr_set_common(const struct xattr_handler *handler,
fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
if (!fullname) if (!fullname)
return -ENOMEM; return -ENOMEM;
rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode),
valid, fullname, pv, size, 0, flags, rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, fullname,
ll_i2suppgid(inode), &req); pv, size, 0, flags, ll_i2suppgid(inode), &req);
kfree(fullname); kfree(fullname);
if (rc) { if (rc) {
if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) { if (rc == -EOPNOTSUPP && handler->flags == XATTR_USER_T) {
...@@ -307,9 +306,8 @@ static int ll_xattr_set(const struct xattr_handler *handler, ...@@ -307,9 +306,8 @@ static int ll_xattr_set(const struct xattr_handler *handler,
flags); flags);
} }
int int ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer,
ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, size_t size, u64 valid)
size_t size, u64 valid)
{ {
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
...@@ -439,6 +437,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler, ...@@ -439,6 +437,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name); fullname = kasprintf(GFP_KERNEL, "%s%s", handler->prefix, name);
if (!fullname) if (!fullname)
return -ENOMEM; return -ENOMEM;
rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size, rc = ll_xattr_list(inode, fullname, handler->flags, buffer, size,
OBD_MD_FLXATTR); OBD_MD_FLXATTR);
kfree(fullname); kfree(fullname);
...@@ -562,6 +561,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) ...@@ -562,6 +561,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
OBD_MD_FLXATTRLS); OBD_MD_FLXATTRLS);
if (rc < 0) if (rc < 0)
return rc; return rc;
/* /*
* If we're being called to get the size of the xattr list * If we're being called to get the size of the xattr list
* (size == 0) then just assume that a lustre.lov xattr * (size == 0) then just assume that a lustre.lov xattr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment