diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/fs/inode.c b/fs/inode.c index bf21dc6d0dbd..5abb097ab1b0 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -414,7 +414,8 @@ static void prune_icache(int nr_to_scan) | |||
414 | __iget(inode); | 414 | __iget(inode); |
415 | spin_unlock(&inode_lock); | 415 | spin_unlock(&inode_lock); |
416 | if (remove_inode_buffers(inode)) | 416 | if (remove_inode_buffers(inode)) |
417 | reap += invalidate_inode_pages(&inode->i_data); | 417 | reap += invalidate_mapping_pages(&inode->i_data, |
418 | 0, -1); | ||
418 | iput(inode); | 419 | iput(inode); |
419 | spin_lock(&inode_lock); | 420 | spin_lock(&inode_lock); |
420 | 421 | ||
@@ -709,7 +710,7 @@ EXPORT_SYMBOL(iunique); | |||
709 | struct inode *igrab(struct inode *inode) | 710 | struct inode *igrab(struct inode *inode) |
710 | { | 711 | { |
711 | spin_lock(&inode_lock); | 712 | spin_lock(&inode_lock); |
712 | if (!(inode->i_state & (I_FREEING|I_WILL_FREE))) | 713 | if (!(inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE))) |
713 | __iget(inode); | 714 | __iget(inode); |
714 | else | 715 | else |
715 | /* | 716 | /* |
@@ -999,7 +1000,7 @@ EXPORT_SYMBOL(remove_inode_hash); | |||
999 | */ | 1000 | */ |
1000 | void generic_delete_inode(struct inode *inode) | 1001 | void generic_delete_inode(struct inode *inode) |
1001 | { | 1002 | { |
1002 | struct super_operations *op = inode->i_sb->s_op; | 1003 | const struct super_operations *op = inode->i_sb->s_op; |
1003 | 1004 | ||
1004 | list_del_init(&inode->i_list); | 1005 | list_del_init(&inode->i_list); |
1005 | list_del_init(&inode->i_sb_list); | 1006 | list_del_init(&inode->i_sb_list); |
@@ -1092,7 +1093,7 @@ EXPORT_SYMBOL_GPL(generic_drop_inode); | |||
1092 | */ | 1093 | */ |
1093 | static inline void iput_final(struct inode *inode) | 1094 | static inline void iput_final(struct inode *inode) |
1094 | { | 1095 | { |
1095 | struct super_operations *op = inode->i_sb->s_op; | 1096 | const struct super_operations *op = inode->i_sb->s_op; |
1096 | void (*drop)(struct inode *) = generic_drop_inode; | 1097 | void (*drop)(struct inode *) = generic_drop_inode; |
1097 | 1098 | ||
1098 | if (op && op->drop_inode) | 1099 | if (op && op->drop_inode) |
@@ -1112,7 +1113,7 @@ static inline void iput_final(struct inode *inode) | |||
1112 | void iput(struct inode *inode) | 1113 | void iput(struct inode *inode) |
1113 | { | 1114 | { |
1114 | if (inode) { | 1115 | if (inode) { |
1115 | struct super_operations *op = inode->i_sb->s_op; | 1116 | const struct super_operations *op = inode->i_sb->s_op; |
1116 | 1117 | ||
1117 | BUG_ON(inode->i_state == I_CLEAR); | 1118 | BUG_ON(inode->i_state == I_CLEAR); |
1118 | 1119 | ||
@@ -1160,11 +1161,9 @@ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) | |||
1160 | struct inode *inode = dentry->d_inode; | 1161 | struct inode *inode = dentry->d_inode; |
1161 | struct timespec now; | 1162 | struct timespec now; |
1162 | 1163 | ||
1163 | if (IS_RDONLY(inode)) | ||
1164 | return; | ||
1165 | if (inode->i_flags & S_NOATIME) | 1164 | if (inode->i_flags & S_NOATIME) |
1166 | return; | 1165 | return; |
1167 | if (inode->i_sb->s_flags & MS_NOATIME) | 1166 | if (IS_NOATIME(inode)) |
1168 | return; | 1167 | return; |
1169 | if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) | 1168 | if ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)) |
1170 | return; | 1169 | return; |
@@ -1252,33 +1251,6 @@ int inode_needs_sync(struct inode *inode) | |||
1252 | 1251 | ||
1253 | EXPORT_SYMBOL(inode_needs_sync); | 1252 | EXPORT_SYMBOL(inode_needs_sync); |
1254 | 1253 | ||
1255 | /* | ||
1256 | * Quota functions that want to walk the inode lists.. | ||
1257 | */ | ||
1258 | #ifdef CONFIG_QUOTA | ||
1259 | |||
1260 | void remove_dquot_ref(struct super_block *sb, int type, | ||
1261 | struct list_head *tofree_head) | ||
1262 | { | ||
1263 | struct inode *inode; | ||
1264 | |||
1265 | if (!sb->dq_op) | ||
1266 | return; /* nothing to do */ | ||
1267 | spin_lock(&inode_lock); /* This lock is for inodes code */ | ||
1268 | |||
1269 | /* | ||
1270 | * We don't have to lock against quota code - test IS_QUOTAINIT is | ||
1271 | * just for speedup... | ||
1272 | */ | ||
1273 | list_for_each_entry(inode, &sb->s_inodes, i_sb_list) | ||
1274 | if (!IS_NOQUOTA(inode)) | ||
1275 | remove_inode_dquot_ref(inode, type, tofree_head); | ||
1276 | |||
1277 | spin_unlock(&inode_lock); | ||
1278 | } | ||
1279 | |||
1280 | #endif | ||
1281 | |||
1282 | int inode_wait(void *word) | 1254 | int inode_wait(void *word) |
1283 | { | 1255 | { |
1284 | schedule(); | 1256 | schedule(); |