Re: [PATCH 1/3] Introduce btrfs_iget helper

2008-08-13 Thread David Woodhouse
On Wed, 2008-08-13 at 10:07 +0100, David Woodhouse wrote: > /* the inode and parent dir are two different roots */ > if (new && root != sub_root) { > igrab(inode); > sub_root->inode = inode; > do

Re: [PATCH 1/3] Introduce btrfs_iget helper

2008-08-13 Thread David Woodhouse
On Tue, 2008-08-12 at 14:46 -0400, Christoph Hellwig wrote: > Please leave the unlock_new_inode to the caller and kill the is_new > parameter. Gives much nicer to read code, and generally making sure the > inode is 100% ready and correct before unlocking it is a good idea, too > so that e.g. no one

Re: [PATCH 1/3] Introduce btrfs_iget helper

2008-08-12 Thread Christoph Hellwig
> +struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location, > + struct btrfs_root *root, int *is_new) > +{ > + struct inode *inode; > + > + inode = btrfs_iget_locked(s, location->objectid, root); > + if (!inode) > + return ERR_PTR(-EAC

[PATCH 1/3] Introduce btrfs_iget helper

2008-08-12 Thread David Woodhouse
From: Balaji Rao <[EMAIL PROTECTED]> This patch introduces a btrfs_iget helper to be used in NFS support. Signed-off-by: Balaji Rao <[EMAIL PROTECTED]> Signed-off-by: David Woodhouse <[EMAIL PROTECTED]> --- ctree.h |2 ++ inode.c | 55 +--