mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Trond.Myklebust@netapp.com, torvalds@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-cachefs@redhat.com, "J. Bruce Fields" <bfields@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/8] CacheFiles: name i_mutex lock class explicitly [ver #2]
Date: Fri, 10 May 2013 20:33:23 +0100	[thread overview]
Message-ID: <20130510193323.3045.57648.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20130510193257.3045.77981.stgit@warthog.procyon.org.uk>

From: J. Bruce Fields <bfields@redhat.com>

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 <bfields@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 fs/cachefiles/namei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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));


  parent reply	other threads:[~2013-05-10 19:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-10 19:32 [PATCH 0/8] Fix assorted FS-Cache issues " David Howells
2013-05-10 19:33 ` [PATCH 1/8] Add wait_on_atomic_t() and wake_up_atomic_t() " David Howells
2013-05-10 19:33 ` [PATCH 2/8] fs/fscache: remove spin_lock() from the condition in while() " David Howells
2013-05-10 19:33 ` David Howells [this message]
2013-05-10 19:33 ` [PATCH 4/8] FS-Cache: Don't sleep in page release if __GFP_FS is not set " David Howells
2013-05-10 19:33 ` [PATCH 5/8] FS-Cache: Uninline fscache_object_init() " David Howells
2013-05-10 19:33 ` [PATCH 6/8] FS-Cache: Wrap checks on object state " David Howells
2013-05-10 19:33 ` [PATCH 7/8] FS-Cache: Fix object state machine to have separate work and wait states " David Howells
2013-05-10 19:34 ` [PATCH 8/8] FS-Cache: Simplify cookie retention for fscache_objects, fixing access problems " David Howells
2013-05-10 20:47 ` [PATCH 1/8] Add wait_on_atomic_t() and wake_up_atomic_t() " David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130510193323.3045.57648.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@redhat.com \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®