From: Paulo Alcantara <pc@manguebit.org>
To: Joseph Qi <joseph.qi@linux.alibaba.com>,
Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
Joseph Qi <joseph.qi@linux.alibaba.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] smb: client: hold the inode across cifs_oplock_break()
Date: Tue, 10 Nov 2026 11:52:58 -0300 [thread overview]
Message-ID: <5773ae99397b259efb80acd386e71fae@manguebit.org> (raw)
In-Reply-To: <20261110094829.2133495-1-joseph.qi@linux.alibaba.com>
Joseph Qi <joseph.qi@linux.alibaba.com> writes:
> cifs_oplock_break() drops the handle reference in the middle of the
> handler and keeps using cinode afterwards, to send the break
> acknowledgment and again in cifs_done_oplock_break(). The reference
> cifs_queue_oplock_break() takes is the only pin: the handle holds the
> dentry and the dentry is what keeps the inode alive.
>
> When that put is the last reference, the dput() in
> cifsFileInfo_put_final() kills an unhashed dentry, drops the last
> i_count and evicts the inode, so the rest of the handler runs on an
> object whose free is only RCU-deferred. An unhashed dentry that a
> handle still references is an ordinary state: unlinking an open file
> leaves the dentry that way, and so does the dcache teardown at unmount.
>
> Take a reference on the inode for the lifetime of the handler and drop
> it once the break has been reported. This also covers the
> cifs_get_tlink() failure path, where the put is followed directly by
> the out label.
> ...
Applied.
prev parent reply other threads:[~2026-11-10 14:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 9:48 Joseph Qi
2026-11-10 14:52 ` Paulo Alcantara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5773ae99397b259efb80acd386e71fae@manguebit.org \
--to=pc@manguebit.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®