aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/udf_i.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 14:45:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-11 14:45:52 -0800
commit7c955fca3e1d8132982148267d9efcafae849bb6 (patch)
treedd55cc5fd36e36d5c6150a0e34ec798d03b1327e /fs/udf/udf_i.h
parente9688f6acad8cb1f2e8d7abb2de06a6a5c9cbcf2 (diff)
parenta4264b3f4049ae7aeeb0017f8158119e22fa354f (diff)
downloadkernel_samsung_smdk4412-7c955fca3e1d8132982148267d9efcafae849bb6.zip
kernel_samsung_smdk4412-7c955fca3e1d8132982148267d9efcafae849bb6.tar.gz
kernel_samsung_smdk4412-7c955fca3e1d8132982148267d9efcafae849bb6.tar.bz2
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: UDF: Close small mem leak in udf_find_entry() udf: Fix directory corruption after extent merging udf: Protect udf_file_aio_write from possible races udf: Remove unnecessary bkl usages udf: Use of s_alloc_mutex to serialize udf_relocate_blocks() execution udf: Replace bkl with the UDF_I(inode)->i_data_sem for protect udf_inode_info struct udf: Remove BKL from free space counting functions udf: Call udf_add_free_space() for more blocks at once in udf_free_blocks() udf: Remove BKL from udf_put_super() and udf_remount_fs() udf: Protect default inode credentials by rwlock udf: Protect all modifications of LVID with s_alloc_mutex udf: Move handling of uniqueID into a helper function and protect it by a s_alloc_mutex udf: Remove BKL from udf_update_inode udf: Convert UDF_SB(sb)->s_flags to use bitops fs/udf: Add printf format/argument verification fs/udf: Use vzalloc (Evil merge: this also removes the BKL dependency from the Kconfig file)
Diffstat (limited to 'fs/udf/udf_i.h')
-rw-r--r--fs/udf/udf_i.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/udf/udf_i.h b/fs/udf/udf_i.h
index e58d1de..d1bd31e 100644
--- a/fs/udf/udf_i.h
+++ b/fs/udf/udf_i.h
@@ -1,6 +1,18 @@
#ifndef _UDF_I_H
#define _UDF_I_H
+/*
+ * The i_data_sem and i_mutex serve for protection of allocation information
+ * of a regular files and symlinks. This includes all extents belonging to
+ * the file/symlink, a fact whether data are in-inode or in external data
+ * blocks, preallocation, goal block information... When extents are read,
+ * i_mutex or i_data_sem must be held (for reading is enough in case of
+ * i_data_sem). When extents are changed, i_data_sem must be held for writing
+ * and also i_mutex must be held.
+ *
+ * For directories i_mutex is used for all the necessary protection.
+ */
+
struct udf_inode_info {
struct timespec i_crtime;
/* Physical address of inode */
@@ -21,6 +33,7 @@ struct udf_inode_info {
struct long_ad *i_lad;
__u8 *i_data;
} i_ext;
+ struct rw_semaphore i_data_sem;
struct inode vfs_inode;
};