mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
Merge pull request #11225 from ukernel/wip-17392
client: protect InodeRef with client_lock Reviewed-by: John Spray <john.spray@redhat.com>
This commit is contained in:
commit
f9f8a36b1e
@ -9947,8 +9947,6 @@ int Client::ll_getattrx(Inode *in, struct ceph_statx *stx, unsigned int want,
|
|||||||
int Client::_ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, int uid,
|
int Client::_ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, int uid,
|
||||||
int gid, InodeRef *inp)
|
int gid, InodeRef *inp)
|
||||||
{
|
{
|
||||||
Mutex::Locker lock(client_lock);
|
|
||||||
|
|
||||||
vinodeno_t vino = _get_vino(in);
|
vinodeno_t vino = _get_vino(in);
|
||||||
|
|
||||||
ldout(cct, 3) << "ll_setattrx " << vino << " mask " << hex << mask << dec
|
ldout(cct, 3) << "ll_setattrx " << vino << " mask " << hex << mask << dec
|
||||||
@ -9978,6 +9976,7 @@ int Client::_ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, int uid,
|
|||||||
int Client::ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, int uid,
|
int Client::ll_setattrx(Inode *in, struct ceph_statx *stx, int mask, int uid,
|
||||||
int gid)
|
int gid)
|
||||||
{
|
{
|
||||||
|
Mutex::Locker lock(client_lock);
|
||||||
InodeRef target(in);
|
InodeRef target(in);
|
||||||
int res = _ll_setattrx(in, stx, mask, uid, gid, &target);
|
int res = _ll_setattrx(in, stx, mask, uid, gid, &target);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
@ -9993,9 +9992,9 @@ int Client::ll_setattr(Inode *in, struct stat *attr, int mask, int uid,
|
|||||||
int gid)
|
int gid)
|
||||||
{
|
{
|
||||||
struct ceph_statx stx;
|
struct ceph_statx stx;
|
||||||
|
|
||||||
stat_to_statx(attr, &stx);
|
stat_to_statx(attr, &stx);
|
||||||
|
|
||||||
|
Mutex::Locker lock(client_lock);
|
||||||
InodeRef target(in);
|
InodeRef target(in);
|
||||||
int res = _ll_setattrx(in, &stx, mask, uid, gid, &target);
|
int res = _ll_setattrx(in, &stx, mask, uid, gid, &target);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user