From 6d083bcb96864b860fda529fc56df5a745d5b1b9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 23 Jul 2024 15:04:43 +0200 Subject: [PATCH] fix up filelock patch on 5.4 and 4.19 --- ...e-locks-reliably-when-fcntl-close-race-is-detected.patch | 6 +++--- queue-4.19/series | 2 +- ...e-locks-reliably-when-fcntl-close-race-is-detected.patch | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/queue-4.19/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch b/queue-4.19/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch index 658462f4fae..60c97d4da3f 100644 --- a/queue-4.19/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch +++ b/queue-4.19/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch @@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/fs/locks.c +++ b/fs/locks.c -@@ -2428,8 +2428,9 @@ int fcntl_setlk64(unsigned int fd, struc +@@ -2297,8 +2297,9 @@ int fcntl_setlk(unsigned int fd, struct error = do_lock_file_wait(filp, cmd, file_lock); /* @@ -53,14 +53,14 @@ Signed-off-by: Greg Kroah-Hartman * unlocking though, or for OFD locks. */ if (!error && file_lock->fl_type != F_UNLCK && -@@ -2443,9 +2444,7 @@ int fcntl_setlk64(unsigned int fd, struc +@@ -2312,9 +2313,7 @@ int fcntl_setlk(unsigned int fd, struct f = fcheck(fd); spin_unlock(¤t->files->file_lock); if (f != filp) { - file_lock->fl_type = F_UNLCK; - error = do_lock_file_wait(filp, cmd, file_lock); - WARN_ON_ONCE(error); -+ locks_remove_posix(filp, files); ++ locks_remove_posix(filp, ¤t->files); error = -EBADF; } } diff --git a/queue-4.19/series b/queue-4.19/series index 507e4aa2bf1..9b6dfd94161 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -1,5 +1,4 @@ gcc-plugins-rename-last_stmt-for-gcc-14.patch -filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch scsi-qedf-set-qed_slowpath_params-to-zero-before-use.patch acpi-ec-abort-address-space-access-upon-error.patch acpi-ec-avoid-returning-ae_ok-on-errors-in-address-s.patch @@ -25,3 +24,4 @@ fs-better-handle-deep-ancestor-chains-in-is_subdir.patch spi-imx-don-t-expect-dma-for-i.mx-25-35-50-51-53-csp.patch selftests-vdso-fix-clang-build-errors-and-warnings.patch hfsplus-fix-uninit-value-in-copy_name.patch +filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch diff --git a/queue-5.4/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch b/queue-5.4/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch index a33202b71e1..f5f27daa3fe 100644 --- a/queue-5.4/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch +++ b/queue-5.4/filelock-remove-locks-reliably-when-fcntl-close-race-is-detected.patch @@ -60,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman - file_lock->fl_type = F_UNLCK; - error = do_lock_file_wait(filp, cmd, file_lock); - WARN_ON_ONCE(error); -+ locks_remove_posix(filp, files); ++ locks_remove_posix(filp, ¤t->files); error = -EBADF; } } -- 2.47.3