[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CBD703B.5060607@panasas.com>
Date: Tue, 19 Oct 2010 12:17:31 +0200
From: Boaz Harrosh <bharrosh@...asas.com>
To: npiggin@...nel.dk
CC: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [patch 33/35] fs: icache introduce inode_get/inode_get_ilock
On 10/19/2010 05:42 AM, npiggin@...nel.dk wrote:
> Factor open coded inode lock, increment, unlock into a function inode_get().
> Rename __iget to inode_get_ilock.
>
> Signed-off-by: Nick Piggin <npiggin@...nel.dk>
>
> ---
<>
> Index: linux-2.6/fs/exofs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/exofs/inode.c 2010-10-19 14:18:58.000000000 +1100
> +++ linux-2.6/fs/exofs/inode.c 2010-10-19 14:19:16.000000000 +1100
> @@ -1162,9 +1162,7 @@
> /* increment the refcount so that the inode will still be around when we
> * reach the callback
> */
> - spin_lock(&inode->i_lock);
> - inode->i_count++;
> - spin_unlock(&inode->i_lock);
> + inode_get(inode);
>
> ios->done = create_done;
> ios->private = inode;
> Index: linux-2.6/fs/exofs/namei.c
> ===================================================================
> --- linux-2.6.orig/fs/exofs/namei.c 2010-10-19 14:18:58.000000000 +1100
> +++ linux-2.6/fs/exofs/namei.c 2010-10-19 14:19:00.000000000 +1100
> @@ -153,9 +153,7 @@
>
> inode->i_ctime = CURRENT_TIME;
> inode_inc_link_count(inode);
> - spin_lock(&inode->i_lock);
> - inode->i_count++;
> - spin_unlock(&inode->i_lock);
> + inode_get(inode);
>
> return exofs_add_nondir(dentry, inode);
> }
Why won't you define an intermediate inode_get() in patch 08/35 and
change both puts and gets of all file_systems in one patch? Instead
of two tree sweeping patches. (At least for all the trivial places
like here)
Thanks
Boaz
--
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