* [PATCH v3 01/19] cifs: change_conf needs to be called for session setup @ 2026-04-28 16:07 nspmangalore 2026-04-28 16:07 ` [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases nspmangalore 2026-04-28 16:07 ` [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir nspmangalore 0 siblings, 2 replies; 6+ messages in thread From: nspmangalore @ 2026-04-28 16:07 UTC (permalink / raw) To: linux-cifs, smfrench, pc, bharathsm, dhowells, henrique.carvalho, ematsumiya Cc: Shyam Prasad N, stable From: Shyam Prasad N <sprasad@microsoft.com> Today we skip calling change_conf for negotiates and session setup requests. This can be a problem for mchan as the immediate next call after session setup could be due to an I/O that is made on the mount point. For single channel, this is not a problem as there will be several calls after setting up session. This change enforces calling change_conf when the total credits contain enough for reservations for echoes and oplocks. We expect this to happen during the last session setup response. This way, echoes and oplocks are not disabled before the first request to the server. So if that first request is an open, it does not need to disable requesting leases. Cc: <stable@vger.kernel.org> Reviewed-by: Bharath SM <bharathsm@microsoft.com> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> --- fs/smb/client/smb2ops.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 509fcea28a429..a9d68e5fcea91 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -111,10 +111,21 @@ smb2_add_credits(struct TCP_Server_Info *server, cifs_trace_rw_credits_zero_in_flight); } server->in_flight--; + + /* + * Rebalance credits when an op drains in_flight. For session setup, + * do this only when the total accumulated credits are high enough (>2) + * so that a newly established secondary channel can reserve credits for + * echoes and oplocks. We expect this to happen at the end of the final + * session setup response. + */ if (server->in_flight == 0 && ((optype & CIFS_OP_MASK) != CIFS_NEG_OP) && ((optype & CIFS_OP_MASK) != CIFS_SESS_OP)) rc = change_conf(server); + else if (server->in_flight == 0 && + ((optype & CIFS_OP_MASK) == CIFS_SESS_OP) && *val > 2) + rc = change_conf(server); /* * Sometimes server returns 0 credits on oplock break ack - we need to * rebalance credits in this case. -- 2.43.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases 2026-04-28 16:07 [PATCH v3 01/19] cifs: change_conf needs to be called for session setup nspmangalore @ 2026-04-28 16:07 ` nspmangalore 2026-04-30 19:16 ` Steve French 2026-04-28 16:07 ` [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir nspmangalore 1 sibling, 1 reply; 6+ messages in thread From: nspmangalore @ 2026-04-28 16:07 UTC (permalink / raw) To: linux-cifs, smfrench, pc, bharathsm, dhowells, henrique.carvalho, ematsumiya Cc: Shyam Prasad N, stable From: Shyam Prasad N <sprasad@microsoft.com> It is possible that SMB2_open_init may not set lease context based on the requested oplock level. This can happen when leases have been temporarily or permanently disabled. When this happens, we will have open_cached_dir making an open without lease context and the response will anyway be rejected by open_cached_dir (thereby forcing a close to discard this open). That's unnecessary two round-trips to the server. This change adds a check before making the open request to the server to make sure that SMB2_open_init did add the expected lease context to the open in open_cached_dir. Cc: <stable@vger.kernel.org> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> --- fs/smb/client/cached_dir.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 04bb95091f498..64e22c064fa0a 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -286,6 +286,14 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, &rqst[0], &oplock, &oparms, utf16_path); if (rc) goto oshr_free; + + if (oplock != SMB2_OPLOCK_LEVEL_II) { + rc = -EINVAL; + cifs_dbg(FYI, "%s: Oplock level %d not suitable for cached directory\n", + __func__, oplock); + goto oshr_free; + } + smb2_set_next_command(tcon, &rqst[0]); memset(&qi_iov, 0, sizeof(qi_iov)); -- 2.43.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases 2026-04-28 16:07 ` [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases nspmangalore @ 2026-04-30 19:16 ` Steve French 0 siblings, 0 replies; 6+ messages in thread From: Steve French @ 2026-04-30 19:16 UTC (permalink / raw) To: nspmangalore Cc: linux-cifs, pc, bharathsm, dhowells, henrique.carvalho, ematsumiya, Shyam Prasad N, stable Added to cifs-2.6.git for-next and added Bharath's Reviewed-by On Tue, Apr 28, 2026 at 11:08 AM <nspmangalore@gmail.com> wrote: > > From: Shyam Prasad N <sprasad@microsoft.com> > > It is possible that SMB2_open_init may not set lease context based > on the requested oplock level. This can happen when leases have been > temporarily or permanently disabled. When this happens, we will have > open_cached_dir making an open without lease context and the response > will anyway be rejected by open_cached_dir (thereby forcing a close to > discard this open). That's unnecessary two round-trips to the server. > > This change adds a check before making the open request to the server > to make sure that SMB2_open_init did add the expected lease context > to the open in open_cached_dir. > > Cc: <stable@vger.kernel.org> > Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> > --- > fs/smb/client/cached_dir.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c > index 04bb95091f498..64e22c064fa0a 100644 > --- a/fs/smb/client/cached_dir.c > +++ b/fs/smb/client/cached_dir.c > @@ -286,6 +286,14 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, > &rqst[0], &oplock, &oparms, utf16_path); > if (rc) > goto oshr_free; > + > + if (oplock != SMB2_OPLOCK_LEVEL_II) { > + rc = -EINVAL; > + cifs_dbg(FYI, "%s: Oplock level %d not suitable for cached directory\n", > + __func__, oplock); > + goto oshr_free; > + } > + > smb2_set_next_command(tcon, &rqst[0]); > > memset(&qi_iov, 0, sizeof(qi_iov)); > -- > 2.43.0 > -- Thanks, Steve ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir 2026-04-28 16:07 [PATCH v3 01/19] cifs: change_conf needs to be called for session setup nspmangalore 2026-04-28 16:07 ` [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases nspmangalore @ 2026-04-28 16:07 ` nspmangalore 2026-04-28 17:28 ` Paulo Alcantara 1 sibling, 1 reply; 6+ messages in thread From: nspmangalore @ 2026-04-28 16:07 UTC (permalink / raw) To: linux-cifs, smfrench, pc, bharathsm, dhowells, henrique.carvalho, ematsumiya Cc: Shyam Prasad N, stable From: Shyam Prasad N <sprasad@microsoft.com> Today we do not invalidate the cached_dirent or the entire parent cfid when a dentry in a dir has been removed/moved. This change invalidates the parent cfid so that we don't serve directory contents from the cache. Cc: <stable@vger.kernel.org> Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> --- fs/smb/client/inode.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c index 888f9e35f14b8..e077df844c819 100644 --- a/fs/smb/client/inode.c +++ b/fs/smb/client/inode.c @@ -28,6 +28,23 @@ #include "cached_dir.h" #include "reparse.h" +static void cifs_invalidate_cached_dir(struct cifs_tcon *tcon, + struct dentry *parent) +{ + struct cached_fid *parent_cfid = NULL; + + if (!tcon || !parent) + return; + + if (!open_cached_dir_by_dentry(tcon, parent, &parent_cfid)) { + mutex_lock(&parent_cfid->dirents.de_mutex); + parent_cfid->dirents.is_valid = false; + parent_cfid->dirents.is_failed = true; + mutex_unlock(&parent_cfid->dirents.de_mutex); + close_cached_dir(parent_cfid); + } +} + /* * Set parameters for the netfs library */ @@ -322,7 +339,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info, fattr->cf_uid = uid; } } - + fattr->cf_gid = cifs_sb->ctx->linux_gid; if (!(sbflags & CIFS_MOUNT_OVERR_GID)) { u64 id = le64_to_cpu(info->Gid); @@ -2067,6 +2084,9 @@ static int __cifs_unlink(struct inode *dir, struct dentry *dentry, bool sillyren cifs_set_file_info(inode, attrs, xid, full_path, origattr); out_reval: + if (!rc && dentry->d_parent) + cifs_invalidate_cached_dir(tcon, dentry->d_parent); + if (inode) { cifs_inode = CIFS_I(inode); cifs_inode->time = 0; /* will force revalidate to get info @@ -2378,7 +2398,6 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) } rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb); - cifs_put_tlink(tlink); cifsInode = CIFS_I(d_inode(direntry)); @@ -2388,6 +2407,8 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) i_size_write(d_inode(direntry), 0); clear_nlink(d_inode(direntry)); spin_unlock(&d_inode(direntry)->i_lock); + if (direntry->d_parent) + cifs_invalidate_cached_dir(tcon, direntry->d_parent); } /* force revalidate to go get info when needed */ @@ -2402,6 +2423,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) inode_set_ctime_current(d_inode(direntry)); inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); + cifs_put_tlink(tlink); rmdir_exit: free_dentry_path(page); @@ -2501,6 +2523,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, struct cifs_sb_info *cifs_sb; struct tcon_link *tlink; struct cifs_tcon *tcon; + struct dentry *source_parent; + struct dentry *target_parent; bool rehash = false; unsigned int xid; int rc, tmprc; @@ -2532,6 +2556,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, if (IS_ERR(tlink)) return PTR_ERR(tlink); tcon = tlink_tcon(tlink); + source_parent = source_dentry->d_parent ? dget(source_dentry->d_parent) : NULL; + target_parent = target_dentry->d_parent ? dget(target_dentry->d_parent) : NULL; server = tcon->ses->server; page1 = alloc_dentry_path(); @@ -2668,11 +2694,21 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, } /* force revalidate to go get info when needed */ + if (!rc) { + cifs_invalidate_cached_dir(tcon, source_parent); + if (target_parent != source_parent) + cifs_invalidate_cached_dir(tcon, target_parent); + } + CIFS_I(source_dir)->time = CIFS_I(target_dir)->time = 0; cifs_rename_exit: if (rehash) d_rehash(target_dentry); + if (target_parent) + dput(target_parent); + if (source_parent) + dput(source_parent); kfree(info_buf_source); free_dentry_path(page2); free_dentry_path(page1); -- 2.43.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir 2026-04-28 16:07 ` [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir nspmangalore @ 2026-04-28 17:28 ` Paulo Alcantara 2026-05-01 9:00 ` Shyam Prasad N 0 siblings, 1 reply; 6+ messages in thread From: Paulo Alcantara @ 2026-04-28 17:28 UTC (permalink / raw) To: nspmangalore, linux-cifs, smfrench, bharathsm, dhowells, henrique.carvalho, ematsumiya Cc: Shyam Prasad N, stable nspmangalore@gmail.com writes: > From: Shyam Prasad N <sprasad@microsoft.com> > > Today we do not invalidate the cached_dirent or the entire > parent cfid when a dentry in a dir has been removed/moved. > > This change invalidates the parent cfid so that we don't serve > directory contents from the cache. > > Cc: <stable@vger.kernel.org> > Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> > --- > fs/smb/client/inode.c | 40 ++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 38 insertions(+), 2 deletions(-) > > diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c > index 888f9e35f14b8..e077df844c819 100644 > --- a/fs/smb/client/inode.c > +++ b/fs/smb/client/inode.c > @@ -28,6 +28,23 @@ > #include "cached_dir.h" > #include "reparse.h" > > +static void cifs_invalidate_cached_dir(struct cifs_tcon *tcon, > + struct dentry *parent) > +{ > + struct cached_fid *parent_cfid = NULL; > + > + if (!tcon || !parent) > + return; The NULL check for @tcon is unnecessary. This seems to be called only with a valid @tcon. > + > + if (!open_cached_dir_by_dentry(tcon, parent, &parent_cfid)) { > + mutex_lock(&parent_cfid->dirents.de_mutex); > + parent_cfid->dirents.is_valid = false; > + parent_cfid->dirents.is_failed = true; > + mutex_unlock(&parent_cfid->dirents.de_mutex); > + close_cached_dir(parent_cfid); > + } > +} > + > /* > * Set parameters for the netfs library > */ > @@ -322,7 +339,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info, > fattr->cf_uid = uid; > } > } > - > + Why are you adding a blank newline? > fattr->cf_gid = cifs_sb->ctx->linux_gid; > if (!(sbflags & CIFS_MOUNT_OVERR_GID)) { > u64 id = le64_to_cpu(info->Gid); > @@ -2067,6 +2084,9 @@ static int __cifs_unlink(struct inode *dir, struct dentry *dentry, bool sillyren > cifs_set_file_info(inode, attrs, xid, full_path, origattr); > > out_reval: > + if (!rc && dentry->d_parent) > + cifs_invalidate_cached_dir(tcon, dentry->d_parent); The non-NULL check of @dentry->d_parent is unnecessary. cifs_invalidate_cached_dir() already handles it. > + > if (inode) { > cifs_inode = CIFS_I(inode); > cifs_inode->time = 0; /* will force revalidate to get info > @@ -2378,7 +2398,6 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > } > > rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb); > - cifs_put_tlink(tlink); > > cifsInode = CIFS_I(d_inode(direntry)); > > @@ -2388,6 +2407,8 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > i_size_write(d_inode(direntry), 0); > clear_nlink(d_inode(direntry)); > spin_unlock(&d_inode(direntry)->i_lock); > + if (direntry->d_parent) > + cifs_invalidate_cached_dir(tcon, direntry->d_parent); Ditto. > } > > /* force revalidate to go get info when needed */ > @@ -2402,6 +2423,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > > inode_set_ctime_current(d_inode(direntry)); > inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); > + cifs_put_tlink(tlink); > > rmdir_exit: > free_dentry_path(page); > @@ -2501,6 +2523,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > struct cifs_sb_info *cifs_sb; > struct tcon_link *tlink; > struct cifs_tcon *tcon; > + struct dentry *source_parent; > + struct dentry *target_parent; > bool rehash = false; > unsigned int xid; > int rc, tmprc; > @@ -2532,6 +2556,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > if (IS_ERR(tlink)) > return PTR_ERR(tlink); > tcon = tlink_tcon(tlink); > + source_parent = source_dentry->d_parent ? dget(source_dentry->d_parent) : NULL; > + target_parent = target_dentry->d_parent ? dget(target_dentry->d_parent) : NULL; Why do you need to dget() ->d_parent? > server = tcon->ses->server; > > page1 = alloc_dentry_path(); > @@ -2668,11 +2694,21 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > } > > /* force revalidate to go get info when needed */ > + if (!rc) { > + cifs_invalidate_cached_dir(tcon, source_parent); > + if (target_parent != source_parent) > + cifs_invalidate_cached_dir(tcon, target_parent); > + } > + > CIFS_I(source_dir)->time = CIFS_I(target_dir)->time = 0; > > cifs_rename_exit: > if (rehash) > d_rehash(target_dentry); > + if (target_parent) > + dput(target_parent); > + if (source_parent) > + dput(source_parent); The non-NULL checks are unnecessary. dput() already handles NULL dentries. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir 2026-04-28 17:28 ` Paulo Alcantara @ 2026-05-01 9:00 ` Shyam Prasad N 0 siblings, 0 replies; 6+ messages in thread From: Shyam Prasad N @ 2026-05-01 9:00 UTC (permalink / raw) To: Paulo Alcantara Cc: linux-cifs, smfrench, bharathsm, dhowells, henrique.carvalho, ematsumiya, Shyam Prasad N, stable On Tue, Apr 28, 2026 at 10:58 PM Paulo Alcantara <pc@manguebit.org> wrote: > > nspmangalore@gmail.com writes: > > > From: Shyam Prasad N <sprasad@microsoft.com> > > > > Today we do not invalidate the cached_dirent or the entire > > parent cfid when a dentry in a dir has been removed/moved. > > > > This change invalidates the parent cfid so that we don't serve > > directory contents from the cache. > > > > Cc: <stable@vger.kernel.org> > > Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> > > --- > > fs/smb/client/inode.c | 40 ++++++++++++++++++++++++++++++++++++++-- > > 1 file changed, 38 insertions(+), 2 deletions(-) > > > > diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c > > index 888f9e35f14b8..e077df844c819 100644 > > --- a/fs/smb/client/inode.c > > +++ b/fs/smb/client/inode.c > > @@ -28,6 +28,23 @@ > > #include "cached_dir.h" > > #include "reparse.h" > > > > +static void cifs_invalidate_cached_dir(struct cifs_tcon *tcon, > > + struct dentry *parent) > > +{ > > + struct cached_fid *parent_cfid = NULL; > > + > > + if (!tcon || !parent) > > + return; > > The NULL check for @tcon is unnecessary. This seems to be called only > with a valid @tcon. > Hi Paulo, Thanks for the review. I would let the null check be. For future callers who may miss the check. > > + > > + if (!open_cached_dir_by_dentry(tcon, parent, &parent_cfid)) { > > + mutex_lock(&parent_cfid->dirents.de_mutex); > > + parent_cfid->dirents.is_valid = false; > > + parent_cfid->dirents.is_failed = true; > > + mutex_unlock(&parent_cfid->dirents.de_mutex); > > + close_cached_dir(parent_cfid); > > + } > > +} > > + > > /* > > * Set parameters for the netfs library > > */ > > @@ -322,7 +339,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info, > > fattr->cf_uid = uid; > > } > > } > > - > > + > > Why are you adding a blank newline? Looks like an empty line with a tab was removed. Will add back the tab. > > > fattr->cf_gid = cifs_sb->ctx->linux_gid; > > if (!(sbflags & CIFS_MOUNT_OVERR_GID)) { > > u64 id = le64_to_cpu(info->Gid); > > @@ -2067,6 +2084,9 @@ static int __cifs_unlink(struct inode *dir, struct dentry *dentry, bool sillyren > > cifs_set_file_info(inode, attrs, xid, full_path, origattr); > > > > out_reval: > > + if (!rc && dentry->d_parent) > > + cifs_invalidate_cached_dir(tcon, dentry->d_parent); > > The non-NULL check of @dentry->d_parent is unnecessary. > cifs_invalidate_cached_dir() already handles it. Will do this change. > > > + > > if (inode) { > > cifs_inode = CIFS_I(inode); > > cifs_inode->time = 0; /* will force revalidate to get info > > @@ -2378,7 +2398,6 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > > } > > > > rc = server->ops->rmdir(xid, tcon, full_path, cifs_sb); > > - cifs_put_tlink(tlink); > > > > cifsInode = CIFS_I(d_inode(direntry)); > > > > @@ -2388,6 +2407,8 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > > i_size_write(d_inode(direntry), 0); > > clear_nlink(d_inode(direntry)); > > spin_unlock(&d_inode(direntry)->i_lock); > > + if (direntry->d_parent) > > + cifs_invalidate_cached_dir(tcon, direntry->d_parent); > > Ditto. > > > } > > > > /* force revalidate to go get info when needed */ > > @@ -2402,6 +2423,7 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) > > > > inode_set_ctime_current(d_inode(direntry)); > > inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); > > + cifs_put_tlink(tlink); > > > > rmdir_exit: > > free_dentry_path(page); > > @@ -2501,6 +2523,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > > struct cifs_sb_info *cifs_sb; > > struct tcon_link *tlink; > > struct cifs_tcon *tcon; > > + struct dentry *source_parent; > > + struct dentry *target_parent; > > bool rehash = false; > > unsigned int xid; > > int rc, tmprc; > > @@ -2532,6 +2556,8 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > > if (IS_ERR(tlink)) > > return PTR_ERR(tlink); > > tcon = tlink_tcon(tlink); > > + source_parent = source_dentry->d_parent ? dget(source_dentry->d_parent) : NULL; > > + target_parent = target_dentry->d_parent ? dget(target_dentry->d_parent) : NULL; > > Why do you need to dget() ->d_parent? Good point. Considering this is a rename callback, I think this dget on parent is redundant. Will fix it. > > > server = tcon->ses->server; > > > > page1 = alloc_dentry_path(); > > @@ -2668,11 +2694,21 @@ cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir, > > } > > > > /* force revalidate to go get info when needed */ > > + if (!rc) { > > + cifs_invalidate_cached_dir(tcon, source_parent); > > + if (target_parent != source_parent) > > + cifs_invalidate_cached_dir(tcon, target_parent); > > + } > > + > > CIFS_I(source_dir)->time = CIFS_I(target_dir)->time = 0; > > > > cifs_rename_exit: > > if (rehash) > > d_rehash(target_dentry); > > + if (target_parent) > > + dput(target_parent); > > + if (source_parent) > > + dput(source_parent); > > The non-NULL checks are unnecessary. dput() already handles NULL > dentries. -- Regards, Shyam ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-01 9:00 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-28 16:07 [PATCH v3 01/19] cifs: change_conf needs to be called for session setup nspmangalore 2026-04-28 16:07 ` [PATCH v3 02/19] cifs: abort open_cached_dir if we don't request leases nspmangalore 2026-04-30 19:16 ` Steve French 2026-04-28 16:07 ` [PATCH v3 03/19] cifs: invalidate cfid on unlink/rename/rmdir nspmangalore 2026-04-28 17:28 ` Paulo Alcantara 2026-05-01 9:00 ` Shyam Prasad N
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox