]> git.baikalelectronics.ru Git - kernel.git/commit
locks: let the caller free file_lock on ->setlease failure
authorChristoph Hellwig <hch@infradead.org>
Sun, 31 Oct 2010 12:35:10 +0000 (08:35 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 31 Oct 2010 13:35:15 +0000 (06:35 -0700)
commit283ef418d582b16624c8dcb1285b14b198941d94
treec60e0da8f8b6393477d79ef6d6ce321ee3b8ecaa
parent18857fb4f061b52d46a07ccbb4f0ee9fe1ded402
locks: let the caller free file_lock on ->setlease failure

The caller allocated it, the caller should free it.

The only issue so far is that we could change the flp pointer even on an
error return if the fl_change callback failed.  But we can simply move
the flp assignment after the fl_change invocation, as the callers don't
care about the flp return value if the setlease call failed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/cifs/cifsfs.c
fs/gfs2/file.c
fs/locks.c
fs/nfs/file.c
fs/nfsd/nfs4state.c