diff options
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c index 637694bf3a03..4f441e46cef4 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -510,12 +510,13 @@ static void __locks_delete_block(struct file_lock *waiter) | |||
510 | 510 | ||
511 | /* | 511 | /* |
512 | */ | 512 | */ |
513 | static void locks_delete_block(struct file_lock *waiter) | 513 | void locks_delete_block(struct file_lock *waiter) |
514 | { | 514 | { |
515 | lock_flocks(); | 515 | lock_flocks(); |
516 | __locks_delete_block(waiter); | 516 | __locks_delete_block(waiter); |
517 | unlock_flocks(); | 517 | unlock_flocks(); |
518 | } | 518 | } |
519 | EXPORT_SYMBOL(locks_delete_block); | ||
519 | 520 | ||
520 | /* Insert waiter into blocker's block list. | 521 | /* Insert waiter into blocker's block list. |
521 | * We use a circular list so that processes can be easily woken up in | 522 | * We use a circular list so that processes can be easily woken up in |
@@ -1445,7 +1446,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) | |||
1445 | struct inode *inode = dentry->d_inode; | 1446 | struct inode *inode = dentry->d_inode; |
1446 | int error; | 1447 | int error; |
1447 | 1448 | ||
1448 | if ((current_fsuid() != inode->i_uid) && !capable(CAP_LEASE)) | 1449 | if ((!uid_eq(current_fsuid(), inode->i_uid)) && !capable(CAP_LEASE)) |
1449 | return -EACCES; | 1450 | return -EACCES; |
1450 | if (!S_ISREG(inode->i_mode)) | 1451 | if (!S_ISREG(inode->i_mode)) |
1451 | return -EINVAL; | 1452 | return -EINVAL; |