Re: [PATCH] cowlinks v2

Jörn Engel
2004-03-21T12:48:30Z

On Sat, 20 March 2004 11:28:28 -0800, Andrew Morton wrote:
>
> yup. Now you're using i_lock to protect i_flags (which seems reasonable)
> you'll need to hnt down all the other i_flags users and make them use
> i_lock too. Currently they appear to be using i_sem.

Interesting task. A few of those users are filesystems that fill
their own flags into inode->i_flags. Here is an example from
fs/ext3/ialloc.c:

static int find_group_orlov(struct super_block *sb, struct inode *parent)
{
...
if ((parent == sb->s_root->d_inode) ||
(parent->i_flags & EXT3_TOPDIR_FL)) {

Shouldn't this rather be:

if ((parent == sb->s_root->d_inode) ||
(EXT3_I(parent)->i_flags & EXT3_TOPDIR_FL)) {

Jörn

--
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong