mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 00:41:08 +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();
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user