diff options
| author | Paul Mundt <lethal@linux-sh.org> | 2010-08-16 13:32:24 +0900 |
|---|---|---|
| committer | Paul Mundt <lethal@linux-sh.org> | 2010-08-16 13:32:24 +0900 |
| commit | bbcf6e8b66ab2fb5ddab4d0fe40c2e6a5ebe5301 (patch) | |
| tree | 071fa9f86dc04a16570be367d04cff3b00c694ad /security/inode.c | |
| parent | 57682827b9a5edb52e33af0be9082b51bffcd5c7 (diff) | |
| parent | da5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sh/include/asm/Kbuild
drivers/Makefile
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'security/inode.c')
| -rw-r--r-- | security/inode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/inode.c b/security/inode.c index 1c812e874504..8c777f022ad1 100644 --- a/security/inode.c +++ b/security/inode.c @@ -86,7 +86,7 @@ static int mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) { struct inode *inode; - int error = -EPERM; + int error = -ENOMEM; if (dentry->d_inode) return -EEXIST; @@ -166,6 +166,8 @@ static int create_by_name(const char *name, mode_t mode, error = mkdir(parent->d_inode, *dentry, mode); else error = create(parent->d_inode, *dentry, mode); + if (error) + dput(*dentry); } else error = PTR_ERR(*dentry); mutex_unlock(&parent->d_inode->i_mutex); |
