Re: [PATCH] ecryptfs: some inode attrs, and a question

From: Andrew Morton
Date: Fri Jan 16 2009 - 02:53:46 EST

On Fri, 16 Jan 2009 16:42:31 +0900 hooanon05@xxxxxxxxxxx wrote:

> Andrew Morton:
> > > + atomic_inc_return(&lower_dentry->d_inode->i_count);
> > > + atomic_inc_return(&lower_inode->i_count);
> >
> > atomic_inc() would suffice here, yes?
> I thought that ..._return() is smp safe and necessary here.
> Because lower_inode may be touched by lower fs (outside of ecryptfs).

atomic_inc() is fully atomic too. atomic_inc_return() is "special",
in that it does an atomic_inc(), but also returns the result of that
increment to the caller.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at