Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125293
b: refs/heads/master
c: e3a2a0d
h: refs/heads/master
i:
  125291: ccbfa48
v: v3
  • Loading branch information
Christian Borntraeger authored and Avi Kivity committed Dec 31, 2008
1 parent 9e54a66 commit 7b73723
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e93353c93a3ba4215633ce930784f40a4e94e3f9
refs/heads/master: e3a2a0d4e5ace731e60e2eff4fb7056ecb34adc1
7 changes: 6 additions & 1 deletion trunk/fs/anon_inodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops,
if (IS_ERR(anon_inode_inode))
return -ENODEV;

if (fops->owner && !try_module_get(fops->owner))
return -ENOENT;

error = get_unused_fd_flags(flags);
if (error < 0)
return error;
goto err_module;
fd = error;

/*
Expand Down Expand Up @@ -128,6 +131,8 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops,
dput(dentry);
err_put_unused_fd:
put_unused_fd(fd);
err_module:
module_put(fops->owner);
return error;
}
EXPORT_SYMBOL_GPL(anon_inode_getfd);
Expand Down

0 comments on commit 7b73723

Please sign in to comment.