diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2017-09-22 12:50:43 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2017-09-27 05:20:34 +0000 |
commit | 572b4bf889d903dcaed49a57a75270a763dc259d (patch) | |
tree | dfeaa3ba763494d0d9d6269fc36f29db5ab1df2e /xlators/features/locks/src/posix.c | |
parent | 24637d54dcbc06de8a7de17c75b9291fcfcfbc84 (diff) |
features/locks: Maintain separation of lock->client_pid, flock->l_pid
Problem:
grant_blocked_locks() constructs flock from lock. Locks xlator uses
frame->root->pid interchangeably flock->l_pid. With gNFS frame->root->pid
(which translates to lock->client_pid) is not same as flock->l_pid, this leads
to lk's cbk returning flock with l_pid from lock->client_pid instead of input
flock->l_pid. This triggers EC's error code path leading to failure of lk call,
because the response' flock->l_pid is different from request's flock->l_pid.
Fix:
Maintain separation of lock->client_pid, flock->l_pid. Always unwind with
flock with correct pid.
BUG: 1472961
Change-Id: Ifab35c458662cf0082b902f37782f8c5321d823d
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r-- | xlators/features/locks/src/posix.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 1b691c0a878..ff9a3da1a2e 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -2294,7 +2294,6 @@ pl_lk (call_frame_t *frame, xlator_t *this, /* fall through */ case F_RESLK_LCK: - memcpy (&reqlock->user_flock, flock, sizeof (struct gf_flock)); reqlock->frame = frame; reqlock->this = this; @@ -2378,8 +2377,6 @@ pl_lk (call_frame_t *frame, xlator_t *this, reqlock->frame = frame; reqlock->this = this; - memcpy (&reqlock->user_flock, flock, sizeof (struct gf_flock)); - pthread_mutex_lock (&pl_inode->mutex); { if (pl_inode->migrated) { |