patch-2.1.58 linux/fs/locks.c

Next file: linux/fs/namei.c
Previous file: linux/fs/lockd/svc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.57/linux/fs/locks.c linux/fs/locks.c
@@ -881,9 +881,6 @@
 
 	if (caller->fl_type != F_UNLCK) {
   repeat:
-		error = -ERESTARTSYS;
-		if (signal_pending(current))
-			goto out;
 		for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
 			if (!(fl->fl_flags & FL_POSIX))
 				continue;
@@ -894,6 +891,9 @@
 				goto out;
 			error = -EDEADLK;
 			if (posix_locks_deadlock(caller, fl))
+				goto out;
+			error = -ERESTARTSYS;
+			if (signal_pending(current))
 				goto out;
 			locks_insert_block(fl, caller);
 			interruptible_sleep_on(&caller->fl_wait);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov