mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
fs: dlm: return positive pid value for F_GETLK
commit92655fbda5upstream. The GETLK pid values have all been negated since commit9d5b86ac13("fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks"). Revert this for local pids, and leave in place negative pids for remote owners. Cc: stable@vger.kernel.org Fixes:9d5b86ac13("fs/locks: Remove fl_nspid and use fs-specific l_pid for remote locks") Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
be19cb6716
commit
3346ffdee4
@@ -359,7 +359,9 @@ int dlm_posix_get(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
|||||||
locks_init_lock(fl);
|
locks_init_lock(fl);
|
||||||
fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
|
fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
|
||||||
fl->fl_flags = FL_POSIX;
|
fl->fl_flags = FL_POSIX;
|
||||||
fl->fl_pid = -op->info.pid;
|
fl->fl_pid = op->info.pid;
|
||||||
|
if (op->info.nodeid != dlm_our_nodeid())
|
||||||
|
fl->fl_pid = -fl->fl_pid;
|
||||||
fl->fl_start = op->info.start;
|
fl->fl_start = op->info.start;
|
||||||
fl->fl_end = op->info.end;
|
fl->fl_end = op->info.end;
|
||||||
rv = 0;
|
rv = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user