lkml.org 
[lkml]   [2010]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] udf: Replace bkl with a mutex for protect udf_sb_info struct
> +		mutex_lock(&sbi->lock);
> result = udf_relocate_blocks(inode->i_sb,
> old_block, &new_block);
> + mutex_unlock(&sbi->lock);

Moving the locking inside udf_relocate_blocks would be cleaner.

> @@ -570,7 +569,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
> if (!udf_parse_options(options, &uopt, true))
> return -EINVAL;
>
> - lock_kernel();
> + mutex_lock(&sbi->lock);

What are you protecting against here? Concurrent remount calls are
protects against by the VFS. Is there any reader that takes sbi->lock
to get a consistent view of the various options? It doesn't seem you
introduce one in this series, so it seems we could do fine without any
locking.

> - unlock_kernel();
> return -ENOMEM;
> }
>
> + mutex_init(&sbi->lock);
> + mutex_lock(&sbi->lock);

What are you locking against here? I can't fine anything that puts the
superblock on a global list in fill_super, and I can't find any code
that would look a superblock up that's not fully set up. I don't think
synchronization here in fill_super is needed at all.

> + /* Serialize writer access, replace the old bkl */
> + struct mutex lock;

Same comment as for the per-inode mutex applies here, too.



\
 
 \ /
  Last update: 2010-11-06 19:19    [W:0.123 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site