Skip to content

Commit 3ab4436

Browse files
committed
Merge tag 'nfsd-5.2-1' of git://linux-nfs.org/~bfields/linux
Pull nfsd fix from Bruce Fields: "This reverts a minor fix which could cause us to treat conflicting NLM locks as nonconflicting. We have proper fix queued up for 5.3. In the meantime, a quick revert seems best for 5.2 and stable" * tag 'nfsd-5.2-1' of git://linux-nfs.org/~bfields/linux: Revert "lockd: Show pid of lockd for remote locks"
2 parents 41e7231 + 141731d commit 3ab4436

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎fs/lockd/xdr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ nlm_decode_lock(__be32 *p, struct nlm_lock *lock)
127127

128128
locks_init_lock(fl);
129129
fl->fl_owner = current->files;
130-
fl->fl_pid = current->tgid;
130+
fl->fl_pid = (pid_t)lock->svid;
131131
fl->fl_flags = FL_POSIX;
132132
fl->fl_type = F_RDLCK; /* as good as anything else */
133133
start = ntohl(*p++);
@@ -269,7 +269,7 @@ nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p)
269269
memset(lock, 0, sizeof(*lock));
270270
locks_init_lock(&lock->fl);
271271
lock->svid = ~(u32) 0;
272-
lock->fl.fl_pid = current->tgid;
272+
lock->fl.fl_pid = (pid_t)lock->svid;
273273

274274
if (!(p = nlm_decode_cookie(p, &argp->cookie))
275275
|| !(p = xdr_decode_string_inplace(p, &lock->caller,

‎fs/lockd/xdr4.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ nlm4_decode_lock(__be32 *p, struct nlm_lock *lock)
119119

120120
locks_init_lock(fl);
121121
fl->fl_owner = current->files;
122-
fl->fl_pid = current->tgid;
122+
fl->fl_pid = (pid_t)lock->svid;
123123
fl->fl_flags = FL_POSIX;
124124
fl->fl_type = F_RDLCK; /* as good as anything else */
125125
p = xdr_decode_hyper(p, &start);
@@ -266,7 +266,7 @@ nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p)
266266
memset(lock, 0, sizeof(*lock));
267267
locks_init_lock(&lock->fl);
268268
lock->svid = ~(u32) 0;
269-
lock->fl.fl_pid = current->tgid;
269+
lock->fl.fl_pid = (pid_t)lock->svid;
270270

271271
if (!(p = nlm4_decode_cookie(p, &argp->cookie))
272272
|| !(p = xdr_decode_string_inplace(p, &lock->caller,

0 commit comments

Comments
 (0)