diff options
author | Paulo Alcantara <pc@cjr.nz> | 2021-03-08 18:00:49 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-03-09 06:23:11 +0300 |
commit | 14302ee3301b3a77b331cc14efb95bf7184c73cc (patch) | |
tree | 402ef29318ff282d8b4dab20545090bfd5546396 /fs/cifs | |
parent | e3d100eae44b42f309c1366efb8397368f1cf8ed (diff) | |
download | linux-14302ee3301b3a77b331cc14efb95bf7184c73cc.tar.xz |
cifs: return proper error code in statfs(2)
In cifs_statfs(), if server->ops->queryfs is not NULL, then we should
use its return value rather than always returning 0. Instead, use rc
variable as it is properly set to 0 in case there is no
server->ops->queryfs.
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
CC: <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index d43e935d2df4..099ad9f3660b 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -290,7 +290,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf) rc = server->ops->queryfs(xid, tcon, cifs_sb, buf); free_xid(xid); - return 0; + return rc; } static long cifs_fallocate(struct file *file, int mode, loff_t off, loff_t len) |