Skip to content

Commit

Permalink
staging: lustre: llite: cleanup xattr code comments
Browse files Browse the repository at this point in the history
Add proper punctuation to the comments. Change buf_size to size
for comment in ll_listxattr() since buf_size doesn't exit which
will confuse someone reading the code.

Signed-off-by: James Simmons <[email protected]>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183
Reviewed-on: https://review.whamcloud.com/27240
Reviewed-by: Dmitry Eremin <[email protected]>
Reviewed-by: Bob Glossman <[email protected]>
Reviewed-by: Sebastien Buisson <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jamesasimmons authored and gregkh committed Apr 23, 2018
1 parent d04bd56 commit e9b1374
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/lustre/lustre/llite/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
return rc;
/*
* If we're being called to get the size of the xattr list
* (buf_size == 0) then just assume that a lustre.lov xattr
* (size == 0) then just assume that a lustre.lov xattr
* exists.
*/
if (!size)
Expand All @@ -577,14 +577,14 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
len = strnlen(xattr_name, rem - 1) + 1;
rem -= len;
if (!xattr_type_filter(sbi, get_xattr_type(xattr_name))) {
/* Skip OK xattr type leave it in buffer */
/* Skip OK xattr type, leave it in buffer. */
xattr_name += len;
continue;
}

/*
* Move up remaining xattrs in buffer
* removing the xattr that is not OK
* removing the xattr that is not OK.
*/
memmove(xattr_name, xattr_name + len, rem);
rc -= len;
Expand Down

0 comments on commit e9b1374

Please sign in to comment.