ANDROID: properly backport filelock fix in 5.10.223
In commit5661b9c7ec
("filelock: Remove locks reliably when fcntl/close race is detected"), upstream the current change was not present, but it is in our branch due to external changes, so fix it up to build and work properly here. Fixes:5661b9c7ec
("filelock: Remove locks reliably when fcntl/close race is detected") Change-Id: I0ac2c1ab80cfb9f9577d09dbee45d3eb2ac19612 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
72f4574b8d
commit
dc67fccdbe
@ -2546,7 +2546,7 @@ int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd,
|
|||||||
f = fcheck(fd);
|
f = fcheck(fd);
|
||||||
spin_unlock(¤t->files->file_lock);
|
spin_unlock(¤t->files->file_lock);
|
||||||
if (f != filp) {
|
if (f != filp) {
|
||||||
locks_remove_posix(filp, files);
|
locks_remove_posix(filp, ¤t->files);
|
||||||
error = -EBADF;
|
error = -EBADF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2676,7 +2676,7 @@ int fcntl_setlk64(unsigned int fd, struct file *filp, unsigned int cmd,
|
|||||||
f = fcheck(fd);
|
f = fcheck(fd);
|
||||||
spin_unlock(¤t->files->file_lock);
|
spin_unlock(¤t->files->file_lock);
|
||||||
if (f != filp) {
|
if (f != filp) {
|
||||||
locks_remove_posix(filp, files);
|
locks_remove_posix(filp, ¤t->files);
|
||||||
error = -EBADF;
|
error = -EBADF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user