[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzRbOgBhmL3y=bgR=OakOH6RizVYD5XBc8aP9LzfMn8cA@mail.gmail.com>
Date: Wed, 3 Jul 2013 13:37:25 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Waiman Long <Waiman.Long@...com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Jeff Layton <jlayton@...hat.com>,
Miklos Szeredi <mszeredi@...e.cz>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Andi Kleen <andi@...stfloor.org>,
"Chandramouleeswaran, Aswin" <aswin@...com>,
"Norton, Scott J" <scott.norton@...com>
Subject: Re: [PATCH v3 03/25] dcache: Enable lockless update of d_count in
dentry structure
This patch grew a lot, and that seems to be mainly because of bad reasons.
I'd suggest dropping the whole
"lockref_ret_count()"/"lockref_ret_lock()" helpers, which cause all
the annoyance, and just make people use the members directly.
Then, just do
#define d_lock d_lockref.lockref_lock
or similar, so that all the existing code just continues to work,
without the need for the syntactic changes:
- spin_lock(&dentry->d_lock);
+ d_lock(dentry);
For d_count, we probably do need to have the wrapper macro:
#define dentry_count(dentry) ((dentry)->d_lockref.lockref_count)
and change the existing users of "dentry->d_count" to use that, but
there are fewer of those than there are of people taking the dentry
lock. And most of them are in fs/dcache.c and would be affected by
this set of patches anyway.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists