# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.706 -> 1.707
# fs/inode.c 1.70 -> 1.71
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/08 chris@wirex.com 1.707
# [PATCH] LSM: move the inode_alloc_security hook.
#
# This moves the inode_alloc_security() hook so that we have all of the
# inode information at the moment of the hook.
# --------------------------------------------
#
diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c Tue Oct 8 15:51:04 2002
+++ b/fs/inode.c Tue Oct 8 15:51:04 2002
@@ -101,14 +101,6 @@
if (inode) {
struct address_space * const mapping = &inode->i_data;
- inode->i_security = NULL;
- if (security_ops->inode_alloc_security(inode)) {
- if (inode->i_sb->s_op->destroy_inode)
- inode->i_sb->s_op->destroy_inode(inode);
- else
- kmem_cache_free(inode_cachep, (inode));
- return NULL;
- }
inode->i_sb = sb;
inode->i_dev = sb->s_dev;
inode->i_blkbits = sb->s_blocksize_bits;
@@ -127,6 +119,14 @@
inode->i_pipe = NULL;
inode->i_bdev = NULL;
inode->i_cdev = NULL;
+ inode->i_security = NULL;
+ if (security_ops->inode_alloc_security(inode)) {
+ if (inode->i_sb->s_op->destroy_inode)
+ inode->i_sb->s_op->destroy_inode(inode);
+ else
+ kmem_cache_free(inode_cachep, (inode));
+ return NULL;
+ }
mapping->a_ops = &empty_aops;
mapping->host = inode;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:29 EST