On Thu, 27 Sep 2007 10:56:09 -0700 (PDT) Davide Libenzi <davidel@xxxxxxxxxxxxxxx> wrote: > Open coded atomic_inc()? Hmm, dunno... box:/usr/src/25> grep 'atomic_inc.*->i_count' */*.c fs/block_dev.c: atomic_inc(&bdev->bd_inode->i_count); fs/block_dev.c: atomic_inc(&bdev->bd_inode->i_count); fs/inode.c: atomic_inc(&inode->i_count); fs/inode.c: atomic_inc(&inode->i_count); fs/libfs.c: atomic_inc(&inode->i_count); fs/namei.c: atomic_inc(&inode->i_count); ipc/mqueue.c: atomic_inc(&inode->i_count); kernel/futex.c: atomic_inc(&key->shared.inode->i_count); mm/shmem.c: atomic_inc(&inode->i_count); /* New dentry reference */ The refcount on that inode is never zero *by design*. So all we'd be doing here is relying upon our existing design, so I think it'd be an OK thing to do. With appropriate code comments, of course. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html