diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-07 13:43:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:48:35 -0400 |
commit | 45321ac54316eaeeebde0b5f728a1791e500974c (patch) | |
tree | c3989dd1a8b4a50168d696aa608941de88da9ade /fs/ocfs2 | |
parent | 30140837f256558c943636245ab90897a9455a70 (diff) |
Make ->drop_inode() just return whether inode needs to be dropped
... and let iput_final() do the actual eviction or retention
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/inode.c | 8 | ||||
-rw-r--r-- | fs/ocfs2/inode.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index eb7fd07c90f2..0492464916b1 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c | |||
@@ -1194,9 +1194,10 @@ void ocfs2_evict_inode(struct inode *inode) | |||
1194 | /* Called under inode_lock, with no more references on the | 1194 | /* Called under inode_lock, with no more references on the |
1195 | * 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 |
1196 | * and to manipulate i_nlink without any other locks. */ | 1196 | * and to manipulate i_nlink without any other locks. */ |
1197 | void ocfs2_drop_inode(struct inode *inode) | 1197 | int ocfs2_drop_inode(struct inode *inode) |
1198 | { | 1198 | { |
1199 | struct ocfs2_inode_info *oi = OCFS2_I(inode); | 1199 | struct ocfs2_inode_info *oi = OCFS2_I(inode); |
1200 | int res; | ||
1200 | 1201 | ||
1201 | mlog_entry_void(); | 1202 | mlog_entry_void(); |
1202 | 1203 | ||
@@ -1204,11 +1205,12 @@ void ocfs2_drop_inode(struct inode *inode) | |||
1204 | (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); |
1205 | 1206 | ||
1206 | if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) | 1207 | if (oi->ip_flags & OCFS2_INODE_MAYBE_ORPHANED) |
1207 | generic_delete_inode(inode); | 1208 | res = 1; |
1208 | else | 1209 | else |
1209 | generic_drop_inode(inode); | 1210 | res = generic_drop_inode(inode); |
1210 | 1211 | ||
1211 | mlog_exit_void(); | 1212 | mlog_exit_void(); |
1213 | return res; | ||
1212 | } | 1214 | } |
1213 | 1215 | ||
1214 | /* | 1216 | /* |
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index 975eedd7b243..6de5a869db30 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h | |||
@@ -124,7 +124,7 @@ static inline struct ocfs2_caching_info *INODE_CACHE(struct inode *inode) | |||
124 | } | 124 | } |
125 | 125 | ||
126 | void ocfs2_evict_inode(struct inode *inode); | 126 | void ocfs2_evict_inode(struct inode *inode); |
127 | void ocfs2_drop_inode(struct inode *inode); | 127 | int ocfs2_drop_inode(struct inode *inode); |
128 | 128 | ||
129 | /* Flags for ocfs2_iget() */ | 129 | /* Flags for ocfs2_iget() */ |
130 | #define OCFS2_FI_FLAG_SYSFILE 0x1 | 130 | #define OCFS2_FI_FLAG_SYSFILE 0x1 |