diff options
author | Michal Marek <mmarek@suse.cz> | 2010-08-20 13:53:08 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-20 13:53:08 +0200 |
commit | e981b060767b3c4ac9393ad8d2558d648e35dfcb (patch) | |
tree | 9c05eaec3072be3645dda61d35085d152b9d5954 /security/inode.c | |
parent | 3c955b407a084810f57260d61548cc92c14bc627 (diff) | |
parent | da5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff) |
Merge commit 'v2.6.36-rc1' into kbuild/rc-fixes
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 1c812e87450..8c777f022ad 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); |