]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] nfsd4_lock() returns bogus values to clients
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 19 Jan 2006 01:43:48 +0000 (17:43 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:28 +0000 (19:20 -0800)
missing nfserrno() in default case of a switch by return value of
posix_lock_file(); as the result we send negative host-endian to clients that
expect positive network-endian, preferably mentioned in RFC...  BTW, that case
is not impossible - posix_lock_file() can return -ENOLCK and we do not handle
that one explicitly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfs4state.c

index 856ed4fd662b80fe02ab8b307b53d26d365bffeb..1143cfb6454900e73bb65a29e315e7a5810b9114 100644 (file)
@@ -2761,7 +2761,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lock
                goto conflicting_lock;
        case (EDEADLK):
                status = nfserr_deadlock;
+               dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
+               goto out;
        default:        
+               status = nfserrno(status);
                dprintk("NFSD: nfsd4_lock: posix_lock_file() failed! status %d\n",status);
                goto out;
        }