Repository navigation
Commit f328296
locks: Copy fl_lmops information for conflock in locks_copy_conflock()
Commit d5b9026 ([PATCH] knfsd: locks: flag NFSv4-owned locks) using
fl_lmops field in file_lock for checking nfsd4 lockowner.
But, commit 1a747ee (locks: don't call ->copy_lock methods on return
of conflicting locks) causes the fl_lmops of conflock always be NULL.
Also, commit 0996905 (lockd: posix_test_lock() should not call
locks_copy_lock()) caused the fl_lmops of conflock always be NULL too.
Make sure copy the private information by fl_copy_lock() in struct
file_lock_operations, merge __locks_copy_lock() to fl_copy_lock().
Jeff advice, "Set fl_lmops on conflocks, but don't set fl_ops.
fl_ops are superfluous, since they are callbacks into the filesystem.
There should be no need to bother the filesystem at all with info
in a conflock. But, lock _ownership_ matters for conflocks and that's
indicated by the fl_lmops. So you really do want to copy the fl_lmops
for conflocks I think."
v5: add missing calling of locks_release_private() in nlmsvc_testlock()
v4: only copy fl_lmops for conflock, don't copy fl_ops
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>1 parent 5c97d7b commit f328296
2 files changed
Lines changed: 17 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
589 | 590 | | |
590 | 591 | | |
591 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 274 | | |
290 | 275 | | |
291 | 276 | | |
| |||
298 | 283 | | |
299 | 284 | | |
300 | 285 | | |
| 286 | + | |
301 | 287 | | |
302 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
303 | 293 | | |
304 | 294 | | |
305 | 295 | | |
| |||
309 | 299 | | |
310 | 300 | | |
311 | 301 | | |
| 302 | + | |
312 | 303 | | |
313 | 304 | | |
314 | | - | |
315 | 305 | | |
316 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
317 | 310 | | |
318 | 311 | | |
319 | 312 | | |
| |||
1989 | 1982 | | |
1990 | 1983 | | |
1991 | 1984 | | |
1992 | | - | |
| 1985 | + | |
1993 | 1986 | | |
1994 | 1987 | | |
1995 | 1988 | | |
1996 | 1989 | | |
| 1990 | + | |
| 1991 | + | |
1997 | 1992 | | |
1998 | 1993 | | |
1999 | 1994 | | |
| |||
2214 | 2209 | | |
2215 | 2210 | | |
2216 | 2211 | | |
2217 | | - | |
| 2212 | + | |
| 2213 | + | |
2218 | 2214 | | |
2219 | 2215 | | |
2220 | 2216 | | |
| |||
0 commit comments