diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 128d0082522c..f9c9dea636d0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -397,8 +397,8 @@ struct block_device { | |||
397 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 397 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
398 | struct inode * bd_inode; /* will die */ | 398 | struct inode * bd_inode; /* will die */ |
399 | int bd_openers; | 399 | int bd_openers; |
400 | struct semaphore bd_sem; /* open/close mutex */ | 400 | struct mutex bd_mutex; /* open/close mutex */ |
401 | struct semaphore bd_mount_sem; /* mount mutex */ | 401 | struct mutex bd_mount_mutex; /* mount mutex */ |
402 | struct list_head bd_inodes; | 402 | struct list_head bd_inodes; |
403 | void * bd_holder; | 403 | void * bd_holder; |
404 | int bd_holders; | 404 | int bd_holders; |
@@ -509,7 +509,7 @@ struct inode { | |||
509 | 509 | ||
510 | #ifdef CONFIG_INOTIFY | 510 | #ifdef CONFIG_INOTIFY |
511 | struct list_head inotify_watches; /* watches on this inode */ | 511 | struct list_head inotify_watches; /* watches on this inode */ |
512 | struct semaphore inotify_sem; /* protects the watches list */ | 512 | struct mutex inotify_mutex; /* protects the watches list */ |
513 | #endif | 513 | #endif |
514 | 514 | ||
515 | unsigned long i_state; | 515 | unsigned long i_state; |
@@ -847,7 +847,7 @@ struct super_block { | |||
847 | * The next field is for VFS *only*. No filesystems have any business | 847 | * The next field is for VFS *only*. No filesystems have any business |
848 | * even looking at it. You had been warned. | 848 | * even looking at it. You had been warned. |
849 | */ | 849 | */ |
850 | struct semaphore s_vfs_rename_sem; /* Kludge */ | 850 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
851 | 851 | ||
852 | /* Granuality of c/m/atime in ns. | 852 | /* Granuality of c/m/atime in ns. |
853 | Cannot be worse than a second */ | 853 | Cannot be worse than a second */ |
@@ -1115,6 +1115,18 @@ static inline void mark_inode_dirty_sync(struct inode *inode) | |||
1115 | __mark_inode_dirty(inode, I_DIRTY_SYNC); | 1115 | __mark_inode_dirty(inode, I_DIRTY_SYNC); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | static inline void inode_inc_link_count(struct inode *inode) | ||
1119 | { | ||
1120 | inode->i_nlink++; | ||
1121 | mark_inode_dirty(inode); | ||
1122 | } | ||
1123 | |||
1124 | static inline void inode_dec_link_count(struct inode *inode) | ||
1125 | { | ||
1126 | inode->i_nlink--; | ||
1127 | mark_inode_dirty(inode); | ||
1128 | } | ||
1129 | |||
1118 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); | 1130 | extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); |
1119 | static inline void file_accessed(struct file *file) | 1131 | static inline void file_accessed(struct file *file) |
1120 | { | 1132 | { |
@@ -1534,7 +1546,7 @@ extern void destroy_inode(struct inode *); | |||
1534 | extern struct inode *new_inode(struct super_block *); | 1546 | extern struct inode *new_inode(struct super_block *); |
1535 | extern int remove_suid(struct dentry *); | 1547 | extern int remove_suid(struct dentry *); |
1536 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | 1548 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); |
1537 | extern struct semaphore iprune_sem; | 1549 | extern struct mutex iprune_mutex; |
1538 | 1550 | ||
1539 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1551 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1540 | extern void remove_inode_hash(struct inode *); | 1552 | extern void remove_inode_hash(struct inode *); |