--- 2.4/fs/fcntl.c Thu Nov 16 07:50:25 2000 +++ build-2.4/fs/fcntl.c Fri May 4 23:12:24 2001 @@ -254,11 +254,15 @@ unlock_kernel(); break; case F_GETLK: + lock_kernel(); err = fcntl_getlk(fd, (struct flock *) arg); + unlock_kernel(); break; case F_SETLK: case F_SETLKW: + lock_kernel(); err = fcntl_setlk(fd, cmd, (struct flock *) arg); + unlock_kernel(); break; case F_GETOWN: /* @@ -338,22 +342,26 @@ if (!filp) goto out; - lock_kernel(); switch (cmd) { case F_GETLK64: + lock_kernel(); err = fcntl_getlk64(fd, (struct flock64 *) arg); + unlock_kernel(); break; case F_SETLK64: + lock_kernel(); err = fcntl_setlk64(fd, cmd, (struct flock64 *) arg); + unlock_kernel(); break; case F_SETLKW64: + lock_kernel(); err = fcntl_setlk64(fd, cmd, (struct flock64 *) arg); + unlock_kernel(); break; default: err = do_fcntl(fd, cmd, arg, filp); break; } - unlock_kernel(); fput(filp); out: return err;