mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
parent
22bd002ee7
commit
72c2d53192
29 changed files with 74 additions and 97 deletions
12
fs/locks.c
12
fs/locks.c
|
|
@ -1579,7 +1579,7 @@ EXPORT_SYMBOL(generic_setlease);
|
|||
|
||||
static int __vfs_setlease(struct file *filp, long arg, struct file_lock **lease)
|
||||
{
|
||||
if (filp->f_op && filp->f_op->setlease)
|
||||
if (filp->f_op->setlease)
|
||||
return filp->f_op->setlease(filp, arg, lease);
|
||||
else
|
||||
return generic_setlease(filp, arg, lease);
|
||||
|
|
@ -1771,7 +1771,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
|
|||
if (error)
|
||||
goto out_free;
|
||||
|
||||
if (f.file->f_op && f.file->f_op->flock)
|
||||
if (f.file->f_op->flock)
|
||||
error = f.file->f_op->flock(f.file,
|
||||
(can_sleep) ? F_SETLKW : F_SETLK,
|
||||
lock);
|
||||
|
|
@ -1797,7 +1797,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
|
|||
*/
|
||||
int vfs_test_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
if (filp->f_op && filp->f_op->lock)
|
||||
if (filp->f_op->lock)
|
||||
return filp->f_op->lock(filp, F_GETLK, fl);
|
||||
posix_test_lock(filp, fl);
|
||||
return 0;
|
||||
|
|
@ -1909,7 +1909,7 @@ out:
|
|||
*/
|
||||
int vfs_lock_file(struct file *filp, unsigned int cmd, struct file_lock *fl, struct file_lock *conf)
|
||||
{
|
||||
if (filp->f_op && filp->f_op->lock)
|
||||
if (filp->f_op->lock)
|
||||
return filp->f_op->lock(filp, cmd, fl);
|
||||
else
|
||||
return posix_lock_file(filp, fl, conf);
|
||||
|
|
@ -2182,7 +2182,7 @@ void locks_remove_flock(struct file *filp)
|
|||
if (!inode->i_flock)
|
||||
return;
|
||||
|
||||
if (filp->f_op && filp->f_op->flock) {
|
||||
if (filp->f_op->flock) {
|
||||
struct file_lock fl = {
|
||||
.fl_pid = current->tgid,
|
||||
.fl_file = filp,
|
||||
|
|
@ -2246,7 +2246,7 @@ EXPORT_SYMBOL(posix_unblock_lock);
|
|||
*/
|
||||
int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
|
||||
{
|
||||
if (filp->f_op && filp->f_op->lock)
|
||||
if (filp->f_op->lock)
|
||||
return filp->f_op->lock(filp, F_CANCELLK, fl);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue