Commit 5678448a authored by Doug Ledford's avatar Doug Ledford Committed by Doug Ledford

fs/proc/inode.c: Make proc use new module loader semantics so that

	touching a /proc/* file doesn't pin a module in memory
parent 28f91107
...@@ -73,7 +73,7 @@ static void proc_delete_inode(struct inode *inode) ...@@ -73,7 +73,7 @@ static void proc_delete_inode(struct inode *inode)
de = PROC_I(inode)->pde; de = PROC_I(inode)->pde;
if (de) { if (de) {
if (de->owner) if (de->owner)
__MOD_DEC_USE_COUNT(de->owner); module_put(de->owner);
de_put(de); de_put(de);
} }
} }
...@@ -200,8 +200,8 @@ printk("proc_iget: using deleted entry %s, count=%d\n", de->name, atomic_read(&d ...@@ -200,8 +200,8 @@ printk("proc_iget: using deleted entry %s, count=%d\n", de->name, atomic_read(&d
inode->i_size = de->size; inode->i_size = de->size;
if (de->nlink) if (de->nlink)
inode->i_nlink = de->nlink; inode->i_nlink = de->nlink;
if (de->owner) if (!try_module_get(de->owner))
__MOD_INC_USE_COUNT(de->owner); goto out_fail;
if (de->proc_iops) if (de->proc_iops)
inode->i_op = de->proc_iops; inode->i_op = de->proc_iops;
if (de->proc_fops) if (de->proc_fops)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment