diff options
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r-- | fs/ext2/inode.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index b890be022496..a50d9db4b6e4 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -53,6 +53,19 @@ static inline int ext2_inode_is_fast_symlink(struct inode *inode) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Called at each iput(). | ||
57 | * | ||
58 | * The inode may be "bad" if ext2_read_inode() saw an error from | ||
59 | * ext2_get_inode(), so we need to check that to avoid freeing random disk | ||
60 | * blocks. | ||
61 | */ | ||
62 | void ext2_put_inode(struct inode *inode) | ||
63 | { | ||
64 | if (!is_bad_inode(inode)) | ||
65 | ext2_discard_prealloc(inode); | ||
66 | } | ||
67 | |||
68 | /* | ||
56 | * Called at the last iput() if i_nlink is zero. | 69 | * Called at the last iput() if i_nlink is zero. |
57 | */ | 70 | */ |
58 | void ext2_delete_inode (struct inode * inode) | 71 | void ext2_delete_inode (struct inode * inode) |