From: Henrique Carvalho Date: Sat, 23 Nov 2024 01:14:37 +0000 (-0300) Subject: smb: client: change return value in open_cached_dir_by_dentry() if !cfids X-Git-Tag: microblaze-v6.16~487^2~19 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=07bdf9272a01741b43461d666fb870ee00b02480;p=linux-2.6-microblaze.git smb: client: change return value in open_cached_dir_by_dentry() if !cfids 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) Reviewed-by: Enzo Matsumiya Signed-off-by: Henrique Carvalho Signed-off-by: Steve French --- diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 414c59132333..81b92d202557 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -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) {