kernel-fxtec-pro1x/fs/lockd
J. Bruce Fields 9d9b87c121 lockd: fix regression in lockd's handling of blocked locks
If a client requests a blocking lock, is denied, then requests it again,
then here in nlmsvc_lock() we will call vfs_lock_file() without FL_SLEEP
set, because we've already queued a block and don't need the locks code
to do it again.

But that means vfs_lock_file() will return -EAGAIN instead of
FILE_LOCK_DENIED.  So we still need to translate that -EAGAIN return
into a nlm_lck_blocked error in this case, and put ourselves back on
lockd's block list.

The bug was introduced by bde74e4bc6 "locks: add special return
value for asynchronous locks".

Thanks to Frank van Maarseveen for the report; his original test
case was essentially

	for i in `seq 30`; do flock /nfsmount/foo sleep 10 & done

Tested-by: Frank van Maarseveen <frankvm@frankvm.com>
Reported-by: Frank van Maarseveen <frankvm@frankvm.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-02-09 13:19:46 -05:00
..
clntlock.c NLM: allow lockd requests from an unprivileged port 2008-12-23 15:21:38 -05:00
clntproc.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
grace.c nfsd: common grace period control 2008-10-03 16:19:02 -04:00
host.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
Makefile nfsd: common grace period control 2008-10-03 16:19:02 -04:00
mon.c NSM: Move nsm_create() 2009-01-06 11:53:56 -05:00
svc.c NLM: Clean up flow of control in make_socks() function 2009-01-07 15:40:44 -05:00
svc4proc.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
svclock.c lockd: fix regression in lockd's handling of blocked locks 2009-02-09 13:19:46 -05:00
svcproc.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
svcshare.c lockd: fix sparse warning in svcshare.c 2008-04-23 16:13:39 -04:00
svcsubs.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
xdr.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00
xdr4.c NSM: Remove include/linux/lockd/sm_inter.h 2009-01-06 11:53:55 -05:00