Message ID | 20241123011437.375637-3-henrique.carvalho@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2,1/3] smb: client: disable directory caching when dir_cache_timeout is zero | expand |
On 11/22, Henrique Carvalho wrote: >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. > >Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com> >--- >V1 -> V2: Split patch and addressed review comments > > fs/smb/client/cached_dir.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c >index 85a8cc04e2c81..d8b1cf1043c35 100644 >--- a/fs/smb/client/cached_dir.c >+++ b/fs/smb/client/cached_dir.c >@@ -396,7 +396,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) { Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de> Cheers
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c index 85a8cc04e2c81..d8b1cf1043c35 100644 --- a/fs/smb/client/cached_dir.c +++ b/fs/smb/client/cached_dir.c @@ -396,7 +396,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) {
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. Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com> --- V1 -> V2: Split patch and addressed review comments fs/smb/client/cached_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)