FAILED: patch "[PATCH] cifs: if deferred close is disabled then close files" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x df9d70c18616760c6504b97fec66b6379c172dbb
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023072105-collapse-errand-9354@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
df9d70c18616 ("cifs: if deferred close is disabled then close files immediately")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From df9d70c18616760c6504b97fec66b6379c172dbb Mon Sep 17 00:00:00 2001
From: Bharath SM <[email protected]>
Date: Fri, 7 Jul 2023 15:29:01 +0000
Subject: [PATCH] cifs: if deferred close is disabled then close files
immediately
If defer close timeout value is set to 0, then there is no need to include files in the deferred close list and utilize the delayed worker for closing. Instead, we can close them immediately.
fs/smb/client/file.c +2 -2
@@ -1080,8 +1080,8 @@ int cifs_close(struct inode *inode, struct file *file) cfile = file->private_data; file->private_data =NULL ; dclose =kmalloc (sizeof (struct cifs_deferred_close ),GFP_KERNEL ); -if ((cinode->oplock ==CIFS_CACHE_RHW_FLG ) && - cinode->lease_granted && +if ((cifs_sb->ctx->closetimeo && cinode->oplock ==CIFS_CACHE_RHW_FLG ) + && cinode->lease_granted && !test_bit (CIFS_INO_CLOSE_ON_LOCK , &cinode->flags) && dclose) {if (test_and_clear_bit (CIFS_INO_MODIFIED_ATTR , &cinode->flags)) {