mirror of
https://github.com/ceph/ceph
synced 2025-03-05 15:58:41 +00:00
Merge PR #17778 into master
* refs/remotes/upstream/pull/17778/head: client: move Fh init to ctor Reviewed-by: Jos Collin <jcollin@redhat.com>
This commit is contained in:
commit
ca775fd02d
@ -8330,15 +8330,10 @@ int Client::lookup_name(Inode *ino, Inode *parent, const UserPerm& perms)
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
#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);
|
||||
}
|
||||
|
@ -44,7 +44,8 @@ struct Fh {
|
||||
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; }
|
||||
|
Loading…
Reference in New Issue
Block a user