Whamcloud - gitweb
LU-9859 libcfs: discard cfs_cap_t, use kernel_cap_t
[fs/lustre-release.git] / lustre / mdt / mdt_xattr.c
index 077363d..59b3374 100644 (file)
@@ -346,7 +346,7 @@ int mdt_dir_layout_update(struct mdt_thread_info *info)
        if (!mdt->mdt_enable_dir_migration)
                RETURN(-EPERM);
 
-       if (!md_capable(uc, CAP_SYS_ADMIN) &&
+       if (!cap_raised(uc->uc_cap, CAP_SYS_ADMIN) &&
            uc->uc_gid != mdt->mdt_enable_remote_dir_gid &&
            mdt->mdt_enable_remote_dir_gid != -1)
                RETURN(-EPERM);
@@ -578,7 +578,7 @@ int mdt_reint_setxattr(struct mdt_thread_info *info,
                        }
                }
 
-               if (!md_capable(mdt_ucred(info), CAP_SYS_ADMIN))
+               if (!cap_raised(mdt_ucred(info)->uc_cap, CAP_SYS_ADMIN))
                        GOTO(out, rc = -EPERM);
 
                if (strcmp(xattr_name, XATTR_NAME_LOV) == 0 ||