diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-03-31 13:53:43 +0200 | 
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-03-31 13:53:43 +0200 | 
| commit | 7bee946358c3cb957d4aa648fc5ab3cad0b232d0 (patch) | |
| tree | 693061ebde2abc35ecc846e5084630d7225aaaff /fs/proc/inode.c | |
| parent | d820ac4c2fa881079e6b689d2098adce337558ae (diff) | |
| parent | 15f7176eb1cccec0a332541285ee752b935c1c85 (diff) | |
Merge branch 'linus' into locking-for-linus
Conflicts:
	lib/Kconfig.debug
Diffstat (limited to 'fs/proc/inode.c')
| -rw-r--r-- | fs/proc/inode.c | 21 | 
1 files changed, 4 insertions, 17 deletions
| diff --git a/fs/proc/inode.c b/fs/proc/inode.c index d8bb5c671f4..d78ade30554 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -58,11 +58,8 @@ static void proc_delete_inode(struct inode *inode)  	/* Let go of any associated proc directory entry */  	de = PROC_I(inode)->pde; -	if (de) { -		if (de->owner) -			module_put(de->owner); +	if (de)  		de_put(de); -	}  	if (PROC_I(inode)->sysctl)  		sysctl_head_put(PROC_I(inode)->sysctl);  	clear_inode(inode); @@ -127,7 +124,7 @@ static void __pde_users_dec(struct proc_dir_entry *pde)  		complete(pde->pde_unload_completion);  } -static void pde_users_dec(struct proc_dir_entry *pde) +void pde_users_dec(struct proc_dir_entry *pde)  {  	spin_lock(&pde->pde_unload_lock);  	__pde_users_dec(pde); @@ -449,12 +446,9 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,  {  	struct inode * inode; -	if (!try_module_get(de->owner)) -		goto out_mod; -  	inode = iget_locked(sb, ino);  	if (!inode) -		goto out_ino; +		return NULL;  	if (inode->i_state & I_NEW) {  		inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;  		PROC_I(inode)->fd = 0; @@ -485,16 +479,9 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,  			}  		}  		unlock_new_inode(inode); -	} else { -	       module_put(de->owner); +	} else  	       de_put(de); -	}  	return inode; - -out_ino: -	module_put(de->owner); -out_mod: -	return NULL;  }			  int proc_fill_super(struct super_block *s) | 
