Skip to content

Commit

Permalink
smb: client: change return value in open_cached_dir_by_dentry() if !c…
Browse files Browse the repository at this point in the history
…fids

Change return value from -ENOENT to -EOPNOTSUPP to maintain consistency
with the return value of open_cached_dir() for the same case. This
change is safe as the only calling function does not differentiate
between these return values.

Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Henrique Carvalho authored and Steve French committed Nov 25, 2024
1 parent ceaf145 commit 07bdf92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/smb/client/cached_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
struct cached_fids *cfids = tcon->cfids;

if (cfids == NULL)
return -ENOENT;
return -EOPNOTSUPP;

spin_lock(&cfids->cfid_list_lock);
list_for_each_entry(cfid, &cfids->entries, entry) {
Expand Down

0 comments on commit 07bdf92

Please sign in to comment.