Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0dd4ae516e7b5be89caed2532f9d953d0b1dbf01
Commit:     0dd4ae516e7b5be89caed2532f9d953d0b1dbf01
Parent:     0c92d7c73b6f99897c8bc7990717b9050cfc722f
Author:     Christopher J. PeBenito <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 09:12:08 2007 -0400
Committer:  James Morris <[EMAIL PROTECTED]>
CommitDate: Wed Jul 11 22:52:19 2007 -0400

    selinux: change sel_make_dir() to specify inode counter.
    
    Specify the inode counter explicitly in sel_make_dir(), rather than always
    using sel_last_ino.
    
    Signed-off-by: Christopher J. PeBenito <[EMAIL PROTECTED]>
    Signed-off-by: James Morris <[EMAIL PROTECTED]>
---
 security/selinux/selinuxfs.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index e955246..cf1acde 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1293,7 +1293,8 @@ out:
        return ret;
 }
 
-static int sel_make_dir(struct inode *dir, struct dentry *dentry)
+static int sel_make_dir(struct inode *dir, struct dentry *dentry,
+                       unsigned long *ino)
 {
        int ret = 0;
        struct inode *inode;
@@ -1305,7 +1306,7 @@ static int sel_make_dir(struct inode *dir, struct dentry 
*dentry)
        }
        inode->i_op = &simple_dir_inode_operations;
        inode->i_fop = &simple_dir_operations;
-       inode->i_ino = ++sel_last_ino;
+       inode->i_ino = ++(*ino);
        /* directory inodes start off with i_nlink == 2 (for "." entry) */
        inc_nlink(inode);
        d_add(dentry, inode);
@@ -1351,7 +1352,7 @@ static int sel_fill_super(struct super_block * sb, void * 
data, int silent)
                goto err;
        }
 
-       ret = sel_make_dir(root_inode, dentry);
+       ret = sel_make_dir(root_inode, dentry, &sel_last_ino);
        if (ret)
                goto err;
 
@@ -1384,7 +1385,7 @@ static int sel_fill_super(struct super_block * sb, void * 
data, int silent)
                goto err;
        }
 
-       ret = sel_make_dir(root_inode, dentry);
+       ret = sel_make_dir(root_inode, dentry, &sel_last_ino);
        if (ret)
                goto err;
 
@@ -1398,7 +1399,7 @@ static int sel_fill_super(struct super_block * sb, void * 
data, int silent)
                goto err;
        }
 
-       ret = sel_make_dir(root_inode, dentry);
+       ret = sel_make_dir(root_inode, dentry, &sel_last_ino);
        if (ret)
                goto err;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to