From: Jeff Layton Date: Mon, 24 Oct 2016 14:03:00 +0000 (-0400) Subject: client: convert ceph_ll_readlink and ceph_ll_rmdir to UserPerm X-Git-Tag: v11.1.0~383^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c248fa7be1e4c4e96df973230401e17f53dec4de;p=ceph.git client: convert ceph_ll_readlink and ceph_ll_rmdir to UserPerm Signed-off-by: Jeff Layton --- diff --git a/src/include/cephfs/libcephfs.h b/src/include/cephfs/libcephfs.h index a5802eebeedb..f54302a65e22 100644 --- a/src/include/cephfs/libcephfs.h +++ b/src/include/cephfs/libcephfs.h @@ -1504,14 +1504,14 @@ int ceph_ll_unlink(struct ceph_mount_info *cmount, struct Inode *in, int ceph_ll_statfs(struct ceph_mount_info *cmount, struct Inode *in, struct statvfs *stbuf); int ceph_ll_readlink(struct ceph_mount_info *cmount, struct Inode *in, - char *buf, size_t bufsize, int uid, int gid); + char *buf, size_t bufsize, const UserPerm *perms); int ceph_ll_symlink(struct ceph_mount_info *cmount, Inode *in, const char *name, const char *value, Inode **out, struct ceph_statx *stx, unsigned want, unsigned flags, const UserPerm *perms); int ceph_ll_rmdir(struct ceph_mount_info *cmount, struct Inode *in, - const char *name, int uid, int gid); + const char *name, const UserPerm *perms); uint32_t ceph_ll_stripe_unit(struct ceph_mount_info *cmount, struct Inode *in); uint32_t ceph_ll_file_layout(struct ceph_mount_info *cmount, diff --git a/src/libcephfs.cc b/src/libcephfs.cc index ea6802973387..0b4934704a04 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -1610,12 +1610,11 @@ extern "C" int ceph_ll_statfs(class ceph_mount_info *cmount, return (cmount->get_client()->ll_statfs(in, stbuf, cmount->default_perms)); } -extern "C" int ceph_ll_readlink(class ceph_mount_info *cmount, - Inode *in, char *buf, size_t bufsiz, int uid, - int gid) +extern "C" int ceph_ll_readlink(class ceph_mount_info *cmount, Inode *in, + char *buf, size_t bufsiz, + const UserPerm *perms) { - UserPerm perms(uid, gid); - return (cmount->get_client()->ll_readlink(in, buf, bufsiz, perms)); + return cmount->get_client()->ll_readlink(in, buf, bufsiz, *perms); } extern "C" int ceph_ll_symlink(class ceph_mount_info *cmount, @@ -1630,10 +1629,9 @@ extern "C" int ceph_ll_symlink(class ceph_mount_info *cmount, extern "C" int ceph_ll_rmdir(class ceph_mount_info *cmount, Inode *in, const char *name, - int uid, int gid) + const UserPerm *perms) { - UserPerm perms(uid, gid); - return (cmount->get_client()->ll_rmdir(in, name, perms)); + return cmount->get_client()->ll_rmdir(in, name, *perms); } extern "C" int ceph_ll_getxattr(class ceph_mount_info *cmount,