Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] Return error in case flock_lock_file failure

If flock_lock_file() failed to allocate flock with locks_alloc_lock()
then "error = 0" is returned. Need to return some non-zero.

Signed-off-by: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: Kirill Korotaev <dev@openvz.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Kirill Korotaev and committed by
Linus Torvalds
9cedc194 eb35cf60

+2
+2
fs/locks.c
··· 755 755 if (request->fl_type == F_UNLCK) 756 756 goto out; 757 757 758 + error = -ENOMEM; 758 759 new_fl = locks_alloc_lock(); 759 760 if (new_fl == NULL) 760 761 goto out; ··· 782 781 locks_copy_lock(new_fl, request); 783 782 locks_insert_lock(&inode->i_flock, new_fl); 784 783 new_fl = NULL; 784 + error = 0; 785 785 786 786 out: 787 787 unlock_kernel();