[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
794ee1baee
commit
1b1dcc1b57
@@ -69,7 +69,7 @@ ntfschar I30[5] = { const_cpu_to_le16('$'), const_cpu_to_le16('I'),
|
||||
* work but we don't care for how quickly one can access them. This also fixes
|
||||
* the dcache aliasing issues.
|
||||
*
|
||||
* Locking: - Caller must hold i_sem on the directory.
|
||||
* Locking: - Caller must hold i_mutex on the directory.
|
||||
* - Each page cache page in the index allocation mapping must be
|
||||
* locked whilst being accessed otherwise we may find a corrupt
|
||||
* page due to it being under ->writepage at the moment which
|
||||
@@ -1085,11 +1085,11 @@ static inline int ntfs_filldir(ntfs_volume *vol, loff_t fpos,
|
||||
* While this will return the names in random order this doesn't matter for
|
||||
* ->readdir but OTOH results in a faster ->readdir.
|
||||
*
|
||||
* VFS calls ->readdir without BKL but with i_sem held. This protects the VFS
|
||||
* VFS calls ->readdir without BKL but with i_mutex held. This protects the VFS
|
||||
* parts (e.g. ->f_pos and ->i_size, and it also protects against directory
|
||||
* modifications).
|
||||
*
|
||||
* Locking: - Caller must hold i_sem on the directory.
|
||||
* Locking: - Caller must hold i_mutex on the directory.
|
||||
* - Each page cache page in the index allocation mapping must be
|
||||
* locked whilst being accessed otherwise we may find a corrupt
|
||||
* page due to it being under ->writepage at the moment which
|
||||
@@ -1520,7 +1520,7 @@ static int ntfs_dir_open(struct inode *vi, struct file *filp)
|
||||
* Note: In the past @filp could be NULL so we ignore it as we don't need it
|
||||
* anyway.
|
||||
*
|
||||
* Locking: Caller must hold i_sem on the inode.
|
||||
* Locking: Caller must hold i_mutex on the inode.
|
||||
*
|
||||
* TODO: We should probably also write all attribute/index inodes associated
|
||||
* with this inode but since we have no simple way of getting to them we ignore
|
||||
|
Reference in New Issue
Block a user