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>
This commit is contained in:
committed by
Linus Torvalds
parent
e231c2ee64
commit
b46980feed
@@ -359,3 +359,17 @@ int is_bad_inode(struct inode *inode)
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(is_bad_inode);
|
||||
|
||||
/**
|
||||
* iget_failed - Mark an under-construction inode as dead and release it
|
||||
* @inode: The inode to discard
|
||||
*
|
||||
* Mark an under-construction inode as dead and release it.
|
||||
*/
|
||||
void iget_failed(struct inode *inode)
|
||||
{
|
||||
make_bad_inode(inode);
|
||||
unlock_new_inode(inode);
|
||||
iput(inode);
|
||||
}
|
||||
EXPORT_SYMBOL(iget_failed);
|
||||
|
Reference in New Issue
Block a user