]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: convert ceph_ll_readlink and ceph_ll_rmdir to UserPerm
authorJeff Layton <jlayton@redhat.com>
Mon, 24 Oct 2016 14:03:00 +0000 (10:03 -0400)
committerJeff Layton <jlayton@redhat.com>
Tue, 25 Oct 2016 17:06:29 +0000 (13:06 -0400)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/include/cephfs/libcephfs.h
src/libcephfs.cc

index a5802eebeedb6230f50e4a9464d60cc01c0c5f07..f54302a65e22867620bd70deb50db798c9bbdd30 100644 (file)
@@ -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,
index ea6802973387ffc2b7dcb086e62a575feef0e3d2..0b4934704a041248db01fb8f6be0cfa53f878748 100644 (file)
@@ -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,