patch-2.0.1 linux/fs/locks.c

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

diff -u --recursive --new-file v2.0.0/linux/fs/locks.c linux/fs/locks.c
@@ -317,6 +317,8 @@
 		break;
 	case F_UNLCK :
 		break;
+	default:
+		return -EINVAL;
 	}
 	
 	return (posix_lock_file(filp, &file_lock, cmd == F_SETLKW));
@@ -448,7 +450,7 @@
 			if (current->signal & ~current->blocked)
 				return (-ERESTARTSYS);
 			if (posix_locks_deadlock(current, fl->fl_owner))
-				return (-EDEADLOCK);
+				return (-EDEADLK);
 			interruptible_sleep_on(&fl->fl_wait);
 			if (current->signal & ~current->blocked)
 				return (-ERESTARTSYS);
@@ -762,7 +764,7 @@
 				if (current->signal & ~current->blocked)
 					return (-ERESTARTSYS);
 				if (posix_locks_deadlock(caller->fl_owner, fl->fl_owner))
-					return (-EDEADLOCK);
+					return (-EDEADLK);
 				interruptible_sleep_on(&fl->fl_wait);
 				if (current->signal & ~current->blocked)
 					return (-ERESTARTSYS);

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