summaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorAlessio Igor Bogani <abogani@texware.it>2010-11-16 18:40:47 +0100
committerJan Kara <jack@suse.cz>2011-01-06 17:03:56 +0100
commit4d0fb621d35007c19a396f2bb629e5aeaacef2d0 (patch)
tree92f6e0d3c38c15b0af507bd4b6d3353e34a337a9 /fs/udf/super.c
parentd1668fe390c1e84580575965684a8fa7e4626dee (diff)
downloadlinux-4d0fb621d35007c19a396f2bb629e5aeaacef2d0.tar.gz
linux-4d0fb621d35007c19a396f2bb629e5aeaacef2d0.tar.bz2
linux-4d0fb621d35007c19a396f2bb629e5aeaacef2d0.zip
udf: Replace bkl with the UDF_I(inode)->i_data_sem for protect udf_inode_info struct
Replace bkl with the UDF_I(inode)->i_data_sem rw semaphore in udf_release_file(), udf_symlink(), udf_symlink_filler(), udf_get_block(), udf_block_map(), and udf_setattr(). The rule now is that any operation on regular file's or symlink's extents (or generally allocation information including goal block) needs to hold i_data_sem. This work was supported by a hardware donation from the CE Linux Forum. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index d2ec9f31e843..441b892cf85e 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -135,6 +135,7 @@ static struct inode *udf_alloc_inode(struct super_block *sb)
ei->i_next_alloc_block = 0;
ei->i_next_alloc_goal = 0;
ei->i_strat4096 = 0;
+ init_rwsem(&ei->i_data_sem);
return &ei->vfs_inode;
}