Re-encode struct fcntl back into Linux's struct file_lock so
[openafs.git] / src / afs / LINUX / osi_vnodeops.c
index 73e22c1..4d726aa 100644 (file)
@@ -640,6 +640,13 @@ static int afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
     AFS_GLOCK();
     code = afs_lockctl(vcp, &flock, cmd, credp);
     AFS_GUNLOCK();
+
+    /* Convert flock back to Linux's file_lock */
+    flp->fl_type = flock.l_type;
+    flp->fl_pid = flock.l_pid;
+    flp->fl_start = flock.l_start;
+    flp->fl_end = flock.l_start + flock.l_len;
+
     crfree(credp);
     return -code;