locks.c (b2576e1d4408e134e2188c967b1f28af39cd79d4) locks.c (002c8976ee537724b20a5e179d9b349309438836)
1/*
2 * linux/fs/locks.c
3 *
4 * Provide support for fcntl()'s F_GETLK, F_SETLK, and F_SETLKW calls.
5 * Doug Evans (dje@spiff.uucp), August 07, 1992
6 *
7 * Deadlock detection added.
8 * FIXME: one thing isn't handled yet:

--- 1550 unchanged lines hidden (view full) ---

1559 *
1560 * %LOCK_UN -- remove an existing lock.
1561 *
1562 * %LOCK_MAND -- a `mandatory' flock. This exists to emulate Windows Share Modes.
1563 *
1564 * %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other
1565 * processes read and write access respectively.
1566 */
1/*
2 * linux/fs/locks.c
3 *
4 * Provide support for fcntl()'s F_GETLK, F_SETLK, and F_SETLKW calls.
5 * Doug Evans (dje@spiff.uucp), August 07, 1992
6 *
7 * Deadlock detection added.
8 * FIXME: one thing isn't handled yet:

--- 1550 unchanged lines hidden (view full) ---

1559 *
1560 * %LOCK_UN -- remove an existing lock.
1561 *
1562 * %LOCK_MAND -- a `mandatory' flock. This exists to emulate Windows Share Modes.
1563 *
1564 * %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other
1565 * processes read and write access respectively.
1566 */
1567asmlinkage long sys_flock(unsigned int fd, unsigned int cmd)
1567SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
1568{
1569 struct file *filp;
1570 struct file_lock *lock;
1571 int can_sleep, unlock;
1572 int error;
1573
1574 error = -EBADF;
1575 filp = fget(fd);

--- 726 unchanged lines hidden ---
1568{
1569 struct file *filp;
1570 struct file_lock *lock;
1571 int can_sleep, unlock;
1572 int error;
1573
1574 error = -EBADF;
1575 filp = fget(fd);

--- 726 unchanged lines hidden ---