Skip to contentSkip to conversation

smb: change return type of cached_dir_lease_break() to bool

PATCH Applied Bharath SM 2 participants 2 messages Jun 30, 2025

Subsystems (2)
lore
Share & tools
lore

Bharath SM

author
#0 lore raw

PATCH 1/2 smb: change return type of cached_dir_lease_break() to bool

cached_dir_lease_break() has return type as int but only returning true or false. change return type of this function to bool for clarity.

---
 fs/smb/client/cached_dir.c | 2 +-
 fs/smb/client/cached_dir.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/smb/client/cached_dir.c +1 -1
index 373e6b688fe3..211a6f35541b 100644
@@ -613,7 +613,7 @@ static void cached_dir_put_work(struct work_struct *work)
 	queue_work(serverclose_wq, &cfid->close_work);
 }
 
-int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16])
+bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16])
 {
 	struct cached_fids *cfids = tcon->cfids;
 	struct cached_fid *cfid;
fs/smb/client/cached_dir.h +1 -1
index bc8a812ff95f..650d727bcea8 100644
@@ -80,6 +80,6 @@ extern void drop_cached_dir_by_name(const unsigned int xid,
 				    struct cifs_sb_info *cifs_sb);
 extern void close_all_cached_dirs(struct cifs_sb_info *cifs_sb);
 extern void invalidate_all_cached_dirs(struct cifs_tcon *tcon);
-extern int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]);
+extern bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]);
 
 #endif			/* _CACHED_DIR_H */
Signature · 1 line
2.43.0
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 39 lines · Bharath SM

cached_dir_lease_break() has return type as int but only returning true or false. change return type of this function to bool for clarity.

---
 fs/smb/client/cached_dir.c | 2 +-
 fs/smb/client/cached_dir.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/smb/client/cached_dir.c +1 -1
index 373e6b688fe3..211a6f35541b 100644
@@ -613,7 +613,7 @@ static void cached_dir_put_work(struct work_struct *work)
        queue_work(serverclose_wq, &cfid->close_work);
 }
 
-int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16])
+bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16])
 {
        struct cached_fids *cfids = tcon->cfids;
        struct cached_fid *cfid;
fs/smb/client/cached_dir.h +1 -2
index bc8a812ff95f..650d727bcea8 100644
@@ -80,6 +80,6 @@ extern void drop_cached_dir_by_name(const unsigned int xid,
                                    struct cifs_sb_info *cifs_sb);
 extern void close_all_cached_dirs(struct cifs_sb_info *cifs_sb);
 extern void invalidate_all_cached_dirs(struct cifs_tcon *tcon);
-extern int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]);
+extern bool cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]);
 
 #endif                 /* _CACHED_DIR_H */
--

2.43.0

Signature · 3 lines
Thanks,

Steve