aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 75e2eae74cd1..409c2ee7750a 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -204,19 +204,20 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
204 struct ext4_sb_info *sbi; 204 struct ext4_sb_info *sbi;
205 int fatal = 0, err, count, cleared; 205 int fatal = 0, err, count, cleared;
206 206
207 if (atomic_read(&inode->i_count) > 1) { 207 if (!sb) {
208 printk(KERN_ERR "ext4_free_inode: inode has count=%d\n", 208 printk(KERN_ERR "EXT4-fs: %s:%d: inode on "
209 atomic_read(&inode->i_count)); 209 "nonexistent device\n", __func__, __LINE__);
210 return; 210 return;
211 } 211 }
212 if (inode->i_nlink) { 212 if (atomic_read(&inode->i_count) > 1) {
213 printk(KERN_ERR "ext4_free_inode: inode has nlink=%d\n", 213 ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: count=%d",
214 inode->i_nlink); 214 __func__, __LINE__, inode->i_ino,
215 atomic_read(&inode->i_count));
215 return; 216 return;
216 } 217 }
217 if (!sb) { 218 if (inode->i_nlink) {
218 printk(KERN_ERR "ext4_free_inode: inode on " 219 ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: nlink=%d\n",
219 "nonexistent device\n"); 220 __func__, __LINE__, inode->i_ino, inode->i_nlink);
220 return; 221 return;
221 } 222 }
222 sbi = EXT4_SB(sb); 223 sbi = EXT4_SB(sb);