Message ID | 20200310123622.064771415@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=QSPG=43=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99FB3C18E5B for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 12:46:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FB7F24694 for <stable@archiver.kernel.org>; Tue, 10 Mar 2020 12:46:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844393; bh=ewhqRxtaE9Vq08pfP77RGCsTISd7n1fBGBXrjGoNLZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XcCBqL7fBvSFj8FFhc3ypDL4H3fAamI010xeeVVx+gkv7G1VucKY+xteyfECLhFK5 wgmMANRMCef3ugisSq1UjRDSuoZOgIMTbhh4oWtNTHDTVU4F9OiogTwIwYHwmJAqnp Vku8nEQ0pQ0nxp21pnjOBPWwYSc62fTsgYQuDN7A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727618AbgCJMqc (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 10 Mar 2020 08:46:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:49808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbgCJMqc (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 10 Mar 2020 08:46:32 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20A392468D; Tue, 10 Mar 2020 12:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844391; bh=ewhqRxtaE9Vq08pfP77RGCsTISd7n1fBGBXrjGoNLZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J/xd067Eq2WGUL75t0iuWmqR5HfM0M8nUDY8rnRCBzC/NZOlneiNziTACQr8hJPq5 mJRZJoXx5/V3lLlWgh/Z0cOtrX3YI+kUV3aOR/pbpCQemob2VbLfxrW1FwEUB4hNLW b3XnjEkTI2IE/8NSUcA3RMS9GNS+lID02tHrUPQs= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Ronnie Sahlberg <lsahlber@redhat.com>, Steve French <stfrench@microsoft.com>, Pavel Shilovsky <pshilov@microsoft.com>, Aurelien Aptel <aaptel@suse.com> Subject: [PATCH 4.9 63/88] cifs: dont leak -EAGAIN for stat() during reconnect Date: Tue, 10 Mar 2020 13:39:11 +0100 Message-Id: <20200310123622.064771415@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1990,6 +1990,7 @@ int cifs_revalidate_dentry_attr(struct d struct inode *inode = d_inode(dentry); struct super_block *sb = dentry->d_sb; char *full_path = NULL; + int count = 0; if (inode == NULL) return -ENOENT; @@ -2011,15 +2012,18 @@ int cifs_revalidate_dentry_attr(struct d full_path, inode, inode->i_count.counter, dentry, cifs_get_time(dentry), jiffies); +again: if (cifs_sb_master_tcon(CIFS_SB(sb))->unix_ext) rc = cifs_get_inode_info_unix(&inode, full_path, sb, xid); else rc = cifs_get_inode_info(&inode, full_path, NULL, sb, xid, NULL); - + if (rc == -EAGAIN && count++ < 10) + goto again; out: kfree(full_path); free_xid(xid); + return rc; }