}
- Fh *Client::_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms)
+Fh *Client::_create_fh(Inode *in, int flags, int cmode, const UserPerm& perms)
{
assert(in);
- Fh *f = new Fh(in);
- f->mode = cmode;
- f->flags = flags;
-
- // inode
- f->actor_perms = perms;
+ Fh *f = new Fh(in, flags, cmode, perms);
ldout(cct, 10) << "_create_fh " << in->ino << " mode " << cmode << dendl;
#include "Fh.h"
-Fh::Fh(Inode *in) : inode(in), _ref(1), pos(0), mds(0), mode(0), flags(0),
- pos_locked(false), actor_perms(), readahead(),
- fcntl_locks(NULL), flock_locks(NULL)
+Fh::Fh(InodeRef in, int flags, int cmode, const UserPerm &perms) :
+ inode(in), _ref(1), pos(0), mds(0), mode(cmode), flags(flags), pos_locked(false),
+ actor_perms(perms), readahead(), fcntl_locks(NULL), flock_locks(NULL)
{
inode->add_fh(this);
}
return e;
}
- Fh(Inode *in);
+ Fh() = delete;
+ Fh(InodeRef in, int flags, int cmode, const UserPerm &perms);
~Fh();
void get() { ++_ref; }
int put() { return --_ref; }