]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/namei.c
Pull altix-mmr into release branch
[linux-2.6-omap-h63xx.git] / fs / namei.c
index 145e852c4bd02d717c3dd9e3b63caa6804870f25..aa62dbda93ac01234670658a315c5472552238aa 100644 (file)
@@ -1048,7 +1048,7 @@ int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata
 out:
        if (unlikely(current->audit_context
                     && nd && nd->dentry && nd->dentry->d_inode))
-               audit_inode(name, nd->dentry->d_inode);
+               audit_inode(name, nd->dentry->d_inode, flags);
        return retval;
 }
 
@@ -1316,10 +1316,8 @@ int vfs_create(struct inode *dir, struct dentry *dentry, int mode,
                return error;
        DQUOT_INIT(dir);
        error = dir->i_op->create(dir, dentry, mode, nd);
-       if (!error) {
+       if (!error)
                fsnotify_create(dir, dentry->d_name.name);
-               security_inode_post_create(dir, dentry, mode);
-       }
        return error;
 }
 
@@ -1553,19 +1551,19 @@ do_link:
        if (nd->last_type != LAST_NORM)
                goto exit;
        if (nd->last.name[nd->last.len]) {
-               putname(nd->last.name);
+               __putname(nd->last.name);
                goto exit;
        }
        error = -ELOOP;
        if (count++==32) {
-               putname(nd->last.name);
+               __putname(nd->last.name);
                goto exit;
        }
        dir = nd->dentry;
        down(&dir->d_inode->i_sem);
        path.dentry = __lookup_hash(&nd->last, nd->dentry, nd);
        path.mnt = nd->mnt;
-       putname(nd->last.name);
+       __putname(nd->last.name);
        goto do_last;
 }
 
@@ -1635,10 +1633,8 @@ int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
 
        DQUOT_INIT(dir);
        error = dir->i_op->mknod(dir, dentry, mode, dev);
-       if (!error) {
+       if (!error)
                fsnotify_create(dir, dentry->d_name.name);
-               security_inode_post_mknod(dir, dentry, mode, dev);
-       }
        return error;
 }
 
@@ -1708,10 +1704,8 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 
        DQUOT_INIT(dir);
        error = dir->i_op->mkdir(dir, dentry, mode);
-       if (!error) {
+       if (!error)
                fsnotify_mkdir(dir, dentry->d_name.name);
-               security_inode_post_mkdir(dir,dentry, mode);
-       }
        return error;
 }
 
@@ -1947,10 +1941,8 @@ int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname, i
 
        DQUOT_INIT(dir);
        error = dir->i_op->symlink(dir, dentry, oldname);
-       if (!error) {
+       if (!error)
                fsnotify_create(dir, dentry->d_name.name);
-               security_inode_post_symlink(dir, dentry, oldname);
-       }
        return error;
 }
 
@@ -2020,10 +2012,8 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
        DQUOT_INIT(dir);
        error = dir->i_op->link(old_dentry, dir, new_dentry);
        up(&old_dentry->d_inode->i_sem);
-       if (!error) {
+       if (!error)
                fsnotify_create(dir, new_dentry->d_name.name);
-               security_inode_post_link(old_dentry, dir, new_dentry);
-       }
        return error;
 }
 
@@ -2142,11 +2132,8 @@ static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
                        d_rehash(new_dentry);
                dput(new_dentry);
        }
-       if (!error) {
+       if (!error)
                d_move(old_dentry,new_dentry);
-               security_inode_post_rename(old_dir, old_dentry,
-                                          new_dir, new_dentry);
-       }
        return error;
 }
 
@@ -2172,7 +2159,6 @@ static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
                /* The following d_move() should become unconditional */
                if (!(old_dir->i_sb->s_type->fs_flags & FS_ODD_RENAME))
                        d_move(old_dentry, new_dentry);
-               security_inode_post_rename(old_dir, old_dentry, new_dir, new_dentry);
        }
        if (target)
                up(&target->i_sem);