locks.c (36d99df2fb474222ab47fbe8ae7385661033223b) locks.c (5fcc60c3a05bf417229fba715e7aec52bf6717fb)
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:

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

1399 * file for writing so we may not take an
1400 * exclusive lease on it.
1401 */
1402 wrlease_count++;
1403 else
1404 rdlease_count++;
1405 }
1406
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:

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

1399 * file for writing so we may not take an
1400 * exclusive lease on it.
1401 */
1402 wrlease_count++;
1403 else
1404 rdlease_count++;
1405 }
1406
1407 error = -EAGAIN;
1407 if ((arg == F_RDLCK && (wrlease_count > 0)) ||
1408 (arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0)))
1409 goto out;
1410
1411 if (my_before != NULL) {
1412 *flp = *my_before;
1413 error = lease->fl_lmops->fl_change(my_before, arg);
1414 goto out;

--- 869 unchanged lines hidden ---
1408 if ((arg == F_RDLCK && (wrlease_count > 0)) ||
1409 (arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0)))
1410 goto out;
1411
1412 if (my_before != NULL) {
1413 *flp = *my_before;
1414 error = lease->fl_lmops->fl_change(my_before, arg);
1415 goto out;

--- 869 unchanged lines hidden ---