mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 17:26:42 +09:00
staging: lustre: llite: cleanup posix acl xattr code
Having an extra ifdef makes the code harder to read. For the case of ll_xattr_get_common() we have a variable initialized at the start of the function but it is only used in XATTR_ACL_ACCESS_T code block. Lets move that variable to that location since its only used there and make the code look cleaner. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6da269bd83
commit
7a85eabfec
@@ -396,9 +396,6 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
|
||||
const char *name, void *buffer, size_t size)
|
||||
{
|
||||
struct ll_sb_info *sbi = ll_i2sbi(inode);
|
||||
#ifdef CONFIG_FS_POSIX_ACL
|
||||
struct ll_inode_info *lli = ll_i2info(inode);
|
||||
#endif
|
||||
char *fullname;
|
||||
int rc;
|
||||
|
||||
@@ -422,6 +419,7 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
|
||||
* chance that cached ACL is uptodate.
|
||||
*/
|
||||
if (handler->flags == XATTR_ACL_ACCESS_T) {
|
||||
struct ll_inode_info *lli = ll_i2info(inode);
|
||||
struct posix_acl *acl;
|
||||
|
||||
spin_lock(&lli->lli_lock);
|
||||
|
||||
Reference in New Issue
Block a user