]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: generate UserPerm _open and _create variants
authorGreg Farnum <gfarnum@redhat.com>
Thu, 28 Jul 2016 18:42:43 +0000 (11:42 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 21 Sep 2016 23:33:47 +0000 (16:33 -0700)
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/client/Client.h

index ebf9bbae343dda9c9def2a00c81bae78601e12c0..d10233d18f072c06927063422285960c7d9f04a3 100644 (file)
@@ -827,10 +827,20 @@ private:
   int _removexattr(Inode *in, const char *nm, const UserPerm& perms);
   int _removexattr(InodeRef &in, const char *nm, const UserPerm& perms);
   int _open(Inode *in, int flags, mode_t mode, Fh **fhp, int uid, int gid);
+  int _open(Inode *in, int flags, mode_t mode, Fh **fhp,
+           const UserPerm& perms) {
+    return _open(in, flags, mode, fhp, perms.uid(), perms.gid());
+  }
   int _renew_caps(Inode *in);
   int _create(Inode *in, const char *name, int flags, mode_t mode, InodeRef *inp, Fh **fhp,
               int stripe_unit, int stripe_count, int object_size, const char *data_pool,
              bool *created, int uid, int gid);
+  int _create(Inode *in, const char *name, int flags, mode_t mode, InodeRef *inp,
+             Fh **fhp, int stripe_unit, int stripe_count, int object_size,
+             const char *data_pool, bool *created, const UserPerm &perms) {
+    return _create(in, name, flags, mode, inp, fhp, stripe_unit, stripe_count,
+           object_size, data_pool, created, perms.uid(), perms.gid());
+  }
 
   loff_t _lseek(Fh *fh, loff_t offset, int whence);
   loff_t _lseek(Fh *fh, loff_t offset, int whence, const UserPerm& perms);