linux-flock-downmap-64-ops-20021120
authorKris Van Hees <kvanhees@sinenomine.net>
Wed, 20 Nov 2002 15:26:18 +0000 (15:26 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 20 Nov 2002 15:26:18 +0000 (15:26 +0000)
downmap F_*LK64 to F_*LK if they're different. we have no large files for now.

src/afs/LINUX/osi_vnodeops.c

index 972aac8..dd11032 100644 (file)
@@ -641,6 +641,16 @@ static int afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
     flock.l_start = flp->fl_start;
     flock.l_len = flp->fl_end - flp->fl_start;
 
+    /* Safe because there are no large files, yet */
+#if F_GETLK != F_GETLK64
+    if (cmd = F_GETLK64)
+       cmd = F_GETLK;
+    else if (cmd = F_SETLK64)
+       cmd = F_SETLK;
+    else if (cmd = F_SETLKW64)
+       cmd = F_SETLKW;
+#endif /* F_GETLK != F_GETLK64 */
+
     AFS_GLOCK();
     code = afs_lockctl(vcp, &flock, cmd, credp);
     AFS_GUNLOCK();