aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-01-09 18:59:24 -0500
committerIngo Molnar <mingo@hera.kernel.org>2006-01-09 18:59:24 -0500
commit1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch)
treeb0b36d4f41d28c9d6514fb309d33c1a084d6309b /include/linux/fs.h
parent794ee1baee1c26be40410233e6c20bceb2b03c08 (diff)
[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>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4c82219b0fae..01654b218e42 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -219,6 +219,7 @@ extern int dir_notify_enable;
219#include <linux/prio_tree.h> 219#include <linux/prio_tree.h>
220#include <linux/init.h> 220#include <linux/init.h>
221#include <linux/sched.h> 221#include <linux/sched.h>
222#include <linux/mutex.h>
222 223
223#include <asm/atomic.h> 224#include <asm/atomic.h>
224#include <asm/semaphore.h> 225#include <asm/semaphore.h>
@@ -484,7 +485,7 @@ struct inode {
484 unsigned long i_blocks; 485 unsigned long i_blocks;
485 unsigned short i_bytes; 486 unsigned short i_bytes;
486 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ 487 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
487 struct semaphore i_sem; 488 struct mutex i_mutex;
488 struct rw_semaphore i_alloc_sem; 489 struct rw_semaphore i_alloc_sem;
489 struct inode_operations *i_op; 490 struct inode_operations *i_op;
490 struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 491 struct file_operations *i_fop; /* former ->i_op->default_file_ops */
@@ -1191,7 +1192,7 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc);
1191 * directory. The name should be stored in the @name (with the 1192 * directory. The name should be stored in the @name (with the
1192 * understanding that it is already pointing to a a %NAME_MAX+1 sized 1193 * understanding that it is already pointing to a a %NAME_MAX+1 sized
1193 * buffer. get_name() should return %0 on success, a negative error code 1194 * buffer. get_name() should return %0 on success, a negative error code
1194 * or error. @get_name will be called without @parent->i_sem held. 1195 * or error. @get_name will be called without @parent->i_mutex held.
1195 * 1196 *
1196 * get_parent: 1197 * get_parent:
1197 * @get_parent should find the parent directory for the given @child which 1198 * @get_parent should find the parent directory for the given @child which
@@ -1213,7 +1214,7 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc);
1213 * nfsd_find_fh_dentry() in either the @obj or @parent parameters. 1214 * nfsd_find_fh_dentry() in either the @obj or @parent parameters.
1214 * 1215 *
1215 * Locking rules: 1216 * Locking rules:
1216 * get_parent is called with child->d_inode->i_sem down 1217 * get_parent is called with child->d_inode->i_mutex down
1217 * get_name is not (which is possibly inconsistent) 1218 * get_name is not (which is possibly inconsistent)
1218 */ 1219 */
1219 1220