CacheFiles: name i_mutex lock class explicitly
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 10 May 2013 18:50:25 +0000 (19:50 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 19 Jun 2013 13:16:47 +0000 (14:16 +0100)
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>
Tested-By: Milosz Tanski <milosz@adfin.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
fs/cachefiles/namei.c

index 8c01c5f..07cbd44 100644 (file)
@@ -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));