]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
lockd: dont return EAGAIN for a permanent error
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 25 Jul 2008 08:48:55 +0000 (01:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:47 +0000 (10:53 -0700)
commitcc77b1521d06be07c9bb1a4a3e1f775dcaa15093
treeb8089e3276d19ba6ab9ecd5ca7ddef7b62df4a7f
parentb81f3ea92ba1fa676775677679889dc2a7f03c8b
lockd: dont return EAGAIN for a permanent error

Fix nlm_fopen() to return NLM_FAILED (or NLM_LCK_DENIED_NOLOCKS) instead
of NLM_LCK_DENIED.  The latter means the lock request failed because of a
conflicting lock (i.e.  a temporary error), which is wrong in this case.

Also fix the client to return ENOLCK instead of EAGAIN if a blocking lock
request returns with NLM_LOCK_DENIED.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: David Teigland <teigland@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/lockd/clntproc.c
fs/nfsd/lockd.c