]> 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:34:28 +0000 (16:34 +0100)
commit18968aa8865de82122be99406c39db3d9b29d13c
tree973c285669993881af6b33e724b3c3dc8fe890fb
parent8895531156701ecc5a70a59e2050b0e4be7ac125
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