From patchwork Fri May 10 19:33:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 2552101 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D54C93FC5A for ; Fri, 10 May 2013 19:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754413Ab3EJTfn (ORCPT ); Fri, 10 May 2013 15:35:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754501Ab3EJTd2 (ORCPT ); Fri, 10 May 2013 15:33:28 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4AJXQaf006822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 May 2013 15:33:26 -0400 Received: from warthog.procyon.org.uk (ovpn-113-147.phx2.redhat.com [10.3.113.147]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4AJXO1b032141; Fri, 10 May 2013 15:33:24 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 3/8] CacheFiles: name i_mutex lock class explicitly [ver #2] To: Trond.Myklebust@netapp.com, torvalds@linux-foundation.org From: David Howells Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cachefs@redhat.com, "J. Bruce Fields" , linux-kernel@vger.kernel.org Date: Fri, 10 May 2013 20:33:23 +0100 Message-ID: <20130510193323.3045.57648.stgit@warthog.procyon.org.uk> In-Reply-To: <20130510193257.3045.77981.stgit@warthog.procyon.org.uk> References: <20130510193257.3045.77981.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: J. Bruce Fields Just some cleanup. (And note the caller of this function may, for example, call vfs_unlink on a child, so the "1" (I_MUTEX_PARENT) really was what was intended here.) Signed-off-by: J. Bruce Fields Signed-off-by: David Howells --- fs/cachefiles/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 8c01c5fc..07cbd44 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -836,7 +836,7 @@ static struct dentry *cachefiles_check_active(struct cachefiles_cache *cache, // dir->d_name.len, dir->d_name.len, dir->d_name.name, filename); /* look up the victim */ - mutex_lock_nested(&dir->d_inode->i_mutex, 1); + mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); start = jiffies; victim = lookup_one_len(filename, dir, strlen(filename));