diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-08-12 15:38:56 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-08-12 15:39:04 -0400 |
| commit | f46a6804135795f77d096ab0128f27531c7d051c (patch) | |
| tree | 7cd33f69e3661327739ae4c96e5a8389e7fc912e /fs/ocfs2/inode.c | |
| parent | b3e84ffa21f916e3354a12a7f19169c9febe96d0 (diff) | |
| parent | ad41a1e0cab07c5125456e8d38e5b1ab148d04aa (diff) | |
Merge branch 'linus' into perf/urgent
Merge reason: Fix upstream breakage introduced by:
de5d9bf: Move list types from <linux/list.h> to <linux/types.h>.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/ocfs2/inode.c')
| -rw-r--r-- | fs/ocfs2/inode.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index abb0a95cc717..0492464916b1 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
| @@ -969,7 +969,7 @@ static void ocfs2_cleanup_delete_inode(struct inode *inode, | |||
| 969 | truncate_inode_pages(&inode->i_data, 0); | 969 | truncate_inode_pages(&inode->i_data, 0); |
| 970 | } | 970 | } |
| 971 | 971 | ||
| 972 | void ocfs2_delete_inode(struct inode *inode) | 972 | static void ocfs2_delete_inode(struct inode *inode) |
| 973 | { | 973 | { |
| 974 | int wipe, status; | 974 | int wipe, status; |
| 975 | sigset_t oldset; | 975 | sigset_t oldset; |
| @@ -1075,20 +1075,17 @@ bail_unlock_nfs_sync: | |||
| 1075 | bail_unblock: | 1075 | bail_unblock: |
| 1076 | ocfs2_unblock_signals(&oldset); | 1076 | ocfs2_unblock_signals(&oldset); |
| 1077 | bail: | 1077 | bail: |
| 1078 | clear_inode(inode); | ||
| 1079 | mlog_exit_void(); | 1078 | mlog_exit_void(); |
| 1080 | } | 1079 | } |
| 1081 | 1080 | ||
| 1082 | void ocfs2_clear_inode(struct inode *inode) | 1081 | static void ocfs2_clear_inode(struct inode *inode) |
| 1083 | { | 1082 | { |
| 1084 | int status; | 1083 | int status; |
| 1085 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1084 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
| 1086 | 1085 | ||
| 1087 | mlog_entry_void(); | 1086 | mlog_entry_void(); |
| 1088 | 1087 | ||
| 1089 | if (!inode) | 1088 | end_writeback(inode); |
| 1090 | goto bail; | ||
| 1091 | |||
| 1092 | mlog(0, "Clearing inode: %llu, nlink = %u\n", | 1089 | mlog(0, "Clearing inode: %llu, nlink = %u\n", |
| 1093 | (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_nlink); | 1090 | (unsigned long long)OCFS2_I(inode)->ip_blkno, inode->i_nlink); |
| 1094 | 1091 | ||
| @@ -1180,16 +1177,27 @@ void ocfs2_clear_inode(struct inode *inode) | |||
| 1180 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, | 1177 | jbd2_journal_release_jbd_inode(OCFS2_SB(inode->i_sb)->journal->j_journal, |
| 1181 | &oi->ip_jinode); | 1178 | &oi->ip_jinode); |
| 1182 | 1179 | ||
| 1183 | bail: | ||
| 1184 | mlog_exit_void(); | 1180 | mlog_exit_void(); |
| 1185 | } | 1181 | } |
| 1186 | 1182 | ||
| 1183 | void ocfs2_evict_inode(struct inode *inode) | ||
| 1184 | { | ||
| 1185 | if (!inode->i_nlink || | ||
| 1186 | (OCFS2_I(inode)->ip_flags & OCFS2_INODE_MAYBE_ORPHANED)) { | ||
| 1187 | ocfs2_delete_inode(inode); | ||
| 1188 | } else { | ||
| 1189 | truncate_inode_pages(&inode->i_data, 0); | ||
| 1190 | } | ||
| 1191 | ocfs2_clear_inode(inode); | ||
| 1192 | } | ||
| 1193 | |||
| 1187 | /* Called under inode_lock, with no more references on the | 1194 | /* Called under inode_lock, with no more references on the |
| 1188 | * struct inode, so it's safe here to check the flags field | 1195 | * struct inode, so it's safe here to check the flags field |
| 1189 | * and to manipulate i_nlink without any other locks. */ | 1196 | * and to manipulate i_nlink without any other locks. */ |
| 1190 | void ocfs2_drop_inode(struct inode *inode) | 1197 | int ocfs2_drop_inode(struct inode *inode) |
| 1191 | { | 1198 | { |
| 1192 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1199 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
| 1200 | int res; | ||
| 1193 | 1201 | ||
| 1194 | mlog_entry_void(); | 1202 | mlog_entry_void(); |
| 1195 | 1203 | ||
| @@ -1197,11 +1205,12 @@ void ocfs2_drop_inode(struct inode *inode) | |||
| 1197 | (unsigned long long)oi->ip_blkno, inode->i_nlink, oi->ip_flags); | 1205 | (unsigned long long)oi->ip_blkno, inode->i_nlink, oi->ip_flags); |
| 1198 | 1206 | ||
| 1199 | if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) | 1207 | if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) |
| 1200 | generic_delete_inode(inode); | 1208 | res = 1; |
| 1201 | else | 1209 | else |
| 1202 | generic_drop_inode(inode); | 1210 | res = generic_drop_inode(inode); |
| 1203 | 1211 | ||
| 1204 | mlog_exit_void(); | 1212 | mlog_exit_void(); |
| 1213 | return res; | ||
| 1205 | } | 1214 | } |
| 1206 | 1215 | ||
| 1207 | /* | 1216 | /* |
