git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
proc: do translation + unlink atomically at remove_proc_entry()
[safe/jmp/linux-2.6]
/
security
/
inode.c
diff --git
a/security/inode.c
b/security/inode.c
index
b41e708
..
c3a7938
100644
(file)
--- a/
security/inode.c
+++ b/
security/inode.c
@@
-61,9
+61,6
@@
static struct inode *get_inode(struct super_block *sb, int mode, dev_t dev)
if (inode) {
inode->i_mode = mode;
if (inode) {
inode->i_mode = mode;
- inode->i_uid = 0;
- inode->i_gid = 0;
- inode->i_blocks = 0;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
switch (mode & S_IFMT) {
default:
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
switch (mode & S_IFMT) {
default:
@@
-159,15
+156,8
@@
static int create_by_name(const char *name, mode_t mode,
* block. A pointer to that is in the struct vfsmount that we
* have around.
*/
* block. A pointer to that is in the struct vfsmount that we
* have around.
*/
- if (!parent ) {
- if (mount && mount->mnt_sb) {
- parent = mount->mnt_sb->s_root;
- }
- }
- if (!parent) {
- pr_debug("securityfs: Ah! can not find a parent!\n");
- return -EFAULT;
- }
+ if (!parent)
+ parent = mount->mnt_sb->s_root;
mutex_lock(&parent->d_inode->i_mutex);
*dentry = lookup_one_len(name, parent, strlen(name));
mutex_lock(&parent->d_inode->i_mutex);
*dentry = lookup_one_len(name, parent, strlen(name));
@@
-290,7
+280,7
@@
void securityfs_remove(struct dentry *dentry)
{
struct dentry *parent;
{
struct dentry *parent;
- if (!dentry)
+ if (!dentry
|| IS_ERR(dentry)
)
return;
parent = dentry->d_parent;
return;
parent = dentry->d_parent;