mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
locks: fix setlease methods to free passed-in lock
We modified setlease to require the caller to allocate the new lease in the case of creating a new lease, but forgot to fix up the filesystem methods. Cc: Steven Whitehouse <[email protected]> Cc: Steve French <[email protected]> Cc: Trond Myklebust <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
096657b65e
commit
05fa3135fd
5 changed files with 11 additions and 3 deletions
|
|
@ -625,8 +625,11 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
|
|||
knows that the file won't be changed on the server
|
||||
by anyone else */
|
||||
return generic_setlease(file, arg, lease);
|
||||
else
|
||||
else {
|
||||
if (arg != F_UNLCK)
|
||||
locks_free_lock(*lease);
|
||||
return -EAGAIN;
|
||||
}
|
||||
}
|
||||
|
||||
struct file_system_type cifs_fs_type = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue