]> git.baikalelectronics.ru Git - kernel.git/commit
locks: prevent ENOMEM on lease unlock
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Oct 2010 21:31:13 +0000 (17:31 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 31 Oct 2010 01:08:14 +0000 (18:08 -0700)
commitf1d33a78fd35f82c6be6f0a88804bf778af498ec
tree8f1657caff93050e416503b418c11c6e6b62b781
parent367cfc1257d422944e0260a4747ea4334582a525
locks: prevent ENOMEM on lease unlock

Removing a lock shouldn't require any allocations; a failure due to
ENOMEM leaves the caller with a choice between retrying or giving up and
leaking an unused lease.

Next we should split the other lease calls into add and delete cases.
I wanted to start with just the bugfix.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/locks.c