mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 08:50:17 +00:00
Re-encode struct fcntl back into Linux's struct file_lock so
that fcntl(F_GETLK) returns proper values to the user.
This commit is contained in:
parent
094adf6b12
commit
b8ebb1a225
@ -640,6 +640,13 @@ static int afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
|
|||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
code = afs_lockctl(vcp, &flock, cmd, credp);
|
code = afs_lockctl(vcp, &flock, cmd, credp);
|
||||||
AFS_GUNLOCK();
|
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);
|
crfree(credp);
|
||||||
return -code;
|
return -code;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user