diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4c82219b0fae..92ae3e2067b0 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 */ |
@@ -820,7 +821,7 @@ struct super_block { | |||
820 | unsigned long s_magic; | 821 | unsigned long s_magic; |
821 | struct dentry *s_root; | 822 | struct dentry *s_root; |
822 | struct rw_semaphore s_umount; | 823 | struct rw_semaphore s_umount; |
823 | struct semaphore s_lock; | 824 | struct mutex s_lock; |
824 | int s_count; | 825 | int s_count; |
825 | int s_syncing; | 826 | int s_syncing; |
826 | int s_need_sync_fs; | 827 | int s_need_sync_fs; |
@@ -892,13 +893,13 @@ static inline int has_fs_excl(void) | |||
892 | static inline void lock_super(struct super_block * sb) | 893 | static inline void lock_super(struct super_block * sb) |
893 | { | 894 | { |
894 | get_fs_excl(); | 895 | get_fs_excl(); |
895 | down(&sb->s_lock); | 896 | mutex_lock(&sb->s_lock); |
896 | } | 897 | } |
897 | 898 | ||
898 | static inline void unlock_super(struct super_block * sb) | 899 | static inline void unlock_super(struct super_block * sb) |
899 | { | 900 | { |
900 | put_fs_excl(); | 901 | put_fs_excl(); |
901 | up(&sb->s_lock); | 902 | mutex_unlock(&sb->s_lock); |
902 | } | 903 | } |
903 | 904 | ||
904 | /* | 905 | /* |
@@ -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 | ||