]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: return proper error code in statfs(2)
authorPaulo Alcantara <pc@cjr.nz>
Mon, 8 Mar 2021 15:00:49 +0000 (12:00 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 15:07:19 +0000 (16:07 +0100)
commita1947c54c6d98bdacd115af05aa0f36758ceed7d
tree1b613adf682c070065f6a79ed6d62d68ec5b8263
parentbdf971bc06a88e58cbe4886e1643da527670c145
cifs: return proper error code in statfs(2)

commit 14302ee3301b3a77b331cc14efb95bf7184c73cc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/cifsfs.c