Re: linux-next: manual merge of the akpm tree with Linus' tree

From: Stephen Rothwell
Date: Tue Sep 10 2013 - 00:12:16 EST


[ Just adding Dave Chinner to the cc list]

On Tue, 10 Sep 2013 14:09:23 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Hi Andrew,
>
> Today's linux-next merge of the akpm tree got a conflict in fs/dcache.c
> between commit 8aab6a27332b ("vfs: reorganize dput() memory accesses")
> from Linus' tree and commit "dentry: move to per-sb LRU locks" from the
> akpm tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary
> (no action is required).
>
> --
> Cheers,
> Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
>
> diff --cc fs/dcache.c
> index 664554e,6e212bd..0000000
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@@ -362,9 -332,8 +361,9 @@@ static void dentry_unlink_inode(struct
> */
> static void dentry_lru_add(struct dentry *dentry)
> {
> - if (list_empty(&dentry->d_lru)) {
> + if (unlikely(!(dentry->d_flags & DCACHE_LRU_LIST))) {
> - spin_lock(&dcache_lru_lock);
> + spin_lock(&dentry->d_sb->s_dentry_lru_lock);
> + dentry->d_flags |= DCACHE_LRU_LIST;
> list_add(&dentry->d_lru, &dentry->d_sb->s_dentry_lru);
> dentry->d_sb->s_nr_dentry_unused++;
> this_cpu_inc(nr_dentry_unused);
> @@@ -394,9 -363,8 +393,9 @@@ static void dentry_lru_del(struct dentr
>
> static void dentry_lru_move_list(struct dentry *dentry, struct list_head *list)
> {
> - spin_lock(&dcache_lru_lock);
> + spin_lock(&dentry->d_sb->s_dentry_lru_lock);
> if (list_empty(&dentry->d_lru)) {
> + dentry->d_flags |= DCACHE_LRU_LIST;
> list_add_tail(&dentry->d_lru, list);
> dentry->d_sb->s_nr_dentry_unused++;
> this_cpu_inc(nr_dentry_unused);

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: pgp00000.pgp
Description: PGP signature