mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
dlm for 3.10
This includes a single patch to avoid fully processing a posix unlock from close when no posix locks exist on the file. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJRf+/nAAoJEDgbc8f8gGmqR+4P/iVTr73MYwI+w4MZcsuyRZlH eswcnil2KRTkQGaEvgydnb2nnRZiVeRL4XsdjW8jjf1UP6XbXLVsLW+Xbej8fAoA G9zUiOb0PyP2MkfpcxNAEZZtHhLSxTIQ2S6fswgYugfjlW4gRAgTPsqslcPPXnWF 1PLyh+c4ZfrrqYb8mKZ4PyTbOispVXwMm2U7ncK2eNARrdus1HmCJGyNa3ydLHO9 731rvbehsjg79PaE5QzW+13jDc4Hy9QHDLXVCOVWQOdE9om+M+jFL/LcDTrgxuRi 7q+pF0a4Gx7AdnuzRVsRXX79sd1dw3sGgT6V9viCoQNjchOsF92Ook2JyW8xJOvj Hy5gqTyYC6MSR6SYw5omz7Id4PsLVWboFcEHAwoERqYpGUm5eql03yD4J0oGbcAd b3nfqk/WGlQLoJ6yoLCpu/yMfQL885qRpe194F2K6t3cVMf68BeKH9o77K4+kYnR QezLvmiGq8n3Bf0qAPV7MdIQdmWyBBBM8cWduGP2rANRorNiR3bV/g1YbEqEVm39 1Ik4ncbTv7jkgl62QpojTUm4+GBuvYQ97bpoKnqzdWEwFECVQt67MTJWBxYz8pZQ lOKdd7oAc8uKjCAj1u9a8m8IuIv9fervJYSIag5QUJ4eJu84nDH535Wh+JrXgJR/ 1uaAHPpnUaJx+boZTnQO =JoHM -----END PGP SIGNATURE----- Merge tag 'dlm-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm update from David Teigland: "This includes a single patch to avoid fully processing a posix unlock from close when no posix locks exist on the file" * tag 'dlm-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: avoid unnecessary posix unlock
This commit is contained in:
commit
8c55f1463c
@ -247,6 +247,7 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
||||
struct dlm_ls *ls;
|
||||
struct plock_op *op;
|
||||
int rv;
|
||||
unsigned char fl_flags = fl->fl_flags;
|
||||
|
||||
ls = dlm_find_lockspace_local(lockspace);
|
||||
if (!ls)
|
||||
@ -258,9 +259,18 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (posix_lock_file_wait(file, fl) < 0)
|
||||
log_error(ls, "dlm_posix_unlock: vfs unlock error %llx",
|
||||
(unsigned long long)number);
|
||||
/* cause the vfs unlock to return ENOENT if lock is not found */
|
||||
fl->fl_flags |= FL_EXISTS;
|
||||
|
||||
rv = posix_lock_file_wait(file, fl);
|
||||
if (rv == -ENOENT) {
|
||||
rv = 0;
|
||||
goto out_free;
|
||||
}
|
||||
if (rv < 0) {
|
||||
log_error(ls, "dlm_posix_unlock: vfs unlock error %d %llx",
|
||||
rv, (unsigned long long)number);
|
||||
}
|
||||
|
||||
op->info.optype = DLM_PLOCK_OP_UNLOCK;
|
||||
op->info.pid = fl->fl_pid;
|
||||
@ -296,9 +306,11 @@ int dlm_posix_unlock(dlm_lockspace_t *lockspace, u64 number, struct file *file,
|
||||
if (rv == -ENOENT)
|
||||
rv = 0;
|
||||
|
||||
out_free:
|
||||
kfree(op);
|
||||
out:
|
||||
dlm_put_lockspace(ls);
|
||||
fl->fl_flags = fl_flags;
|
||||
return rv;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dlm_posix_unlock);
|
||||
|
Loading…
Reference in New Issue
Block a user