summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-10-30 08:26:04 +0100
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-10-30 08:26:04 +0100
commit9ed0451ee0a13469f7b38e4ced8974036f6d114f (patch)
treebb9c5622198296933512dea3cefacfc17756eb1c /fs/xfs/xfs_inode.h
parentInode: export symbol destroy_inode (diff)
downloadlinux-9ed0451ee0a13469f7b38e4ced8974036f6d114f.tar.xz
linux-9ed0451ee0a13469f7b38e4ced8974036f6d114f.zip
[XFS] free partially initialized inodes using destroy_inode
To make sure we free the security data inodes need to be freed using the proper VFS helper (which we also need to export for this). We mark these inodes bad so we can skip the flush path for them. SGI-PV: 987246 SGI-Modid: xfs-linux-melb:xfs-kern:32398a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: David Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 5d12cfeb43c5..7f007ef4bbb3 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -310,6 +310,23 @@ static inline struct inode *VFS_I(struct xfs_inode *ip)
}
/*
+ * Get rid of a partially initialized inode.
+ *
+ * We have to go through destroy_inode to make sure allocations
+ * from init_inode_always like the security data are undone.
+ *
+ * We mark the inode bad so that it takes the short cut in
+ * the reclaim path instead of going through the flush path
+ * which doesn't make sense for an inode that has never seen the
+ * light of day.
+ */
+static inline void xfs_destroy_inode(struct xfs_inode *ip)
+{
+ make_bad_inode(VFS_I(ip));
+ return destroy_inode(VFS_I(ip));
+}
+
+/*
* i_flags helper functions
*/
static inline void