Whamcloud - gitweb
LU-4047 build: fix 'memory' errors
[fs/lustre-release.git] / lustre / llite / xattr.c
index 22f81f0..3db8073 100644 (file)
@@ -88,19 +88,19 @@ int get_xattr_type(const char *name)
 static
 int xattr_type_filter(struct ll_sb_info *sbi, int xattr_type)
 {
-       if ((xattr_type == XATTR_ACL_ACCESS_T ||
-            xattr_type == XATTR_ACL_DEFAULT_T) &&
-          !(sbi->ll_flags & LL_SBI_ACL))
-               return -EOPNOTSUPP;
-
-       if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR))
-               return -EOPNOTSUPP;
-       if (xattr_type == XATTR_TRUSTED_T && !cfs_capable(CAP_SYS_ADMIN))
-               return -EPERM;
-       if (xattr_type == XATTR_OTHER_T)
-               return -EOPNOTSUPP;
-
-       return 0;
+        if ((xattr_type == XATTR_ACL_ACCESS_T ||
+             xattr_type == XATTR_ACL_DEFAULT_T) &&
+           !(sbi->ll_flags & LL_SBI_ACL))
+                return -EOPNOTSUPP;
+
+        if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR))
+                return -EOPNOTSUPP;
+        if (xattr_type == XATTR_TRUSTED_T && !cfs_capable(CFS_CAP_SYS_ADMIN))
+                return -EPERM;
+        if (xattr_type == XATTR_OTHER_T)
+                return -EOPNOTSUPP;
+
+        return 0;
 }
 
 static
@@ -215,8 +215,8 @@ int ll_setxattr(struct dentry *dentry, const char *name,
         LASSERT(inode);
         LASSERT(name);
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
+       CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
+              PFID(ll_inode2fid(inode)), inode, name);
 
         ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1);
 
@@ -267,8 +267,8 @@ int ll_removexattr(struct dentry *dentry, const char *name)
         LASSERT(inode);
         LASSERT(name);
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
+       CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
+              PFID(ll_inode2fid(inode)), inode, name);
 
         ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1);
         return ll_setxattr_common(inode, name, NULL, 0, 0,
@@ -289,8 +289,8 @@ int ll_getxattr_common(struct inode *inode, const char *name,
        struct ll_inode_info *lli = ll_i2info(inode);
         ENTRY;
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n",
-               inode->i_ino, inode->i_generation, inode);
+       CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
+              PFID(ll_inode2fid(inode)), inode);
 
         /* listxattr have slightly different behavior from of ext3:
          * without 'user_xattr' ext3 will list all xattr names but
@@ -448,8 +448,8 @@ ssize_t ll_getxattr(struct dentry *dentry, const char *name,
         LASSERT(inode);
         LASSERT(name);
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
+       CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), xattr %s\n",
+              PFID(ll_inode2fid(inode)), inode, name);
 
         ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
 
@@ -537,8 +537,8 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
 
         LASSERT(inode);
 
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n",
-               inode->i_ino, inode->i_generation, inode);
+       CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
+              PFID(ll_inode2fid(inode)), inode);
 
         ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1);