From patchwork Mon May 17 11:18:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 100094 Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4HBJ7ZM028834 for ; Mon, 17 May 2010 11:19:42 GMT Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id BF2F2AD230; Mon, 17 May 2010 05:19:06 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.8 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.122]) by lists.samba.org (Postfix) with ESMTP id BDC87AD0F6 for ; Mon, 17 May 2010 05:18:59 -0600 (MDT) X-Authority-Analysis: v=1.1 cv=+XtKR9tF7NBviulhRn3U+l51pW2CIoo6aM1lwUwvIC0= c=1 sm=0 a=K6iWNgVYQBIA:10 a=hO-oPbc3tlwA:10 a=ld/erqUjW76FpBUqCqkKeA==:17 a=20KFwNOVAAAA:8 a=f_wHHFNkOho-ibmbXI8A:9 a=CpGGX99zRVRj5Wfs4ewA:7 a=Y8eTwwQYEanDflqyxlI42qhxpOUA:4 a=jEp0ucaQiEUA:10 a=ld/erqUjW76FpBUqCqkKeA==:117 X-Cloudmark-Score: 0 X-Originating-IP: 71.70.153.3 Received: from [71.70.153.3] ([71.70.153.3:33020] helo=mail.poochiereds.net) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.2.39 r()) with ESMTP id 27/85-23029-22621FB4; Mon, 17 May 2010 11:18:58 +0000 Received: by mail.poochiereds.net (Postfix, from userid 4447) id 748BE580AC; Mon, 17 May 2010 07:18:58 -0400 (EDT) From: Jeff Layton To: smfrench@gmail.com Date: Mon, 17 May 2010 07:18:56 -0400 Message-Id: <1274095138-3386-2-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1274095138-3386-1-git-send-email-jlayton@redhat.com> References: <1274095138-3386-1-git-send-email-jlayton@redhat.com> Cc: linux-cifs-client@lists.samba.org Subject: [linux-cifs-client] [PATCH 1/3] cifs: always revalidate hardlinked inodes X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 17 May 2010 11:19:43 +0000 (UTC) diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index b35cb03..f52161a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1511,6 +1511,10 @@ cifs_inode_needs_reval(struct inode *inode) if (time_after_eq(jiffies, cifs_i->time + HZ)) return true; + /* hardlinked files get "special" treatment */ + if (S_ISREG(inode->i_mode) && inode->i_nlink != 1) + return true; + return false; }