diff options
author | David Howells <dhowells@redhat.com> | 2008-02-07 03:15:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:26 -0500 |
commit | b46980feed937868d3333514028bfbe9a651e4ca (patch) | |
tree | 97e610932986223932887af3c0ea00234856e540 /fs/bad_inode.c | |
parent | e231c2ee64eb1c5cd3c63c31da9dac7d888dcf7f (diff) |
iget: introduce a function to register iget failure
Introduce a function to register failure in an inode construction path. This
includes marking the inode under construction as bad, unlocking it and
releasing it.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/bad_inode.c')
-rw-r--r-- | fs/bad_inode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/bad_inode.c b/fs/bad_inode.c index 521ff7caadbd..f1c2ea8342f5 100644 --- a/fs/bad_inode.c +++ b/fs/bad_inode.c | |||
@@ -359,3 +359,17 @@ int is_bad_inode(struct inode *inode) | |||
359 | } | 359 | } |
360 | 360 | ||
361 | EXPORT_SYMBOL(is_bad_inode); | 361 | EXPORT_SYMBOL(is_bad_inode); |
362 | |||
363 | /** | ||
364 | * iget_failed - Mark an under-construction inode as dead and release it | ||
365 | * @inode: The inode to discard | ||
366 | * | ||
367 | * Mark an under-construction inode as dead and release it. | ||
368 | */ | ||
369 | void iget_failed(struct inode *inode) | ||
370 | { | ||
371 | make_bad_inode(inode); | ||
372 | unlock_new_inode(inode); | ||
373 | iput(inode); | ||
374 | } | ||
375 | EXPORT_SYMBOL(iget_failed); | ||