Re: [2.6.26 PATCH, RESEND]: fs_stack/eCryptfs: fsstack_copy_* updates

From: hooanon05
Date: Sun May 11 2008 - 20:49:54 EST



Erez Zadok:
> The nice thing about these two helpers is fsstack_copy_inode_size becomes a
> lot cleaner and more elegant:
>
> void fsstack_copy_inode_size(struct inode *dst, struct inode *src)
> {
> i_blocks_write(dst, i_blocks_read(src));
> i_size_write(dst, i_size_read(src));
> }

While this function looks simple, I think it is more generic and better
that the caller of fsstack_copy_inode_size() holds i_lock instead of
lock it in the callee.


Junjiro Okajima
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/