projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
[deliverable/linux.git]
/
fs
/
dcache.c
diff --git
a/fs/dcache.c
b/fs/dcache.c
index f1358e5c3a59b3b5f2551980956f84e09355378e..d96047b4a633a86cb7ae711cb29362ac6cda061a 100644
(file)
--- a/
fs/dcache.c
+++ b/
fs/dcache.c
@@
-536,7
+536,7
@@
restart:
*/
static void prune_dcache(int count)
{
*/
static void prune_dcache(int count)
{
- struct super_block *sb;
+ struct super_block *sb
, *n
;
int w_count;
int unused = dentry_stat.nr_unused;
int prune_ratio;
int w_count;
int unused = dentry_stat.nr_unused;
int prune_ratio;
@@
-545,13
+545,14
@@
static void prune_dcache(int count)
if (unused == 0 || count == 0)
return;
spin_lock(&dcache_lock);
if (unused == 0 || count == 0)
return;
spin_lock(&dcache_lock);
-restart:
if (count >= unused)
prune_ratio = 1;
else
prune_ratio = unused / count;
spin_lock(&sb_lock);
if (count >= unused)
prune_ratio = 1;
else
prune_ratio = unused / count;
spin_lock(&sb_lock);
- list_for_each_entry(sb, &super_blocks, s_list) {
+ list_for_each_entry_safe(sb, n, &super_blocks, s_list) {
+ if (list_empty(&sb->s_instances))
+ continue;
if (sb->s_nr_dentry_unused == 0)
continue;
sb->s_count++;
if (sb->s_nr_dentry_unused == 0)
continue;
sb->s_count++;
@@
-590,14
+591,10
@@
restart:
}
spin_lock(&sb_lock);
count -= pruned;
}
spin_lock(&sb_lock);
count -= pruned;
- /*
- * restart only when sb is no longer on the list and
- * we have more work to do.
- */
- if (__put_super_and_need_restart(sb) && count > 0) {
- spin_unlock(&sb_lock);
- goto restart;
- }
+ __put_super(sb);
+ /* more work left to do? */
+ if (count <= 0)
+ break;
}
spin_unlock(&sb_lock);
spin_unlock(&dcache_lock);
}
spin_unlock(&sb_lock);
spin_unlock(&dcache_lock);
@@
-1529,6
+1526,7
@@
void d_delete(struct dentry * dentry)
spin_lock(&dentry->d_lock);
isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) {
spin_lock(&dentry->d_lock);
isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) {
+ dentry->d_flags &= ~DCACHE_CANT_MOUNT;
dentry_iput(dentry);
fsnotify_nameremove(dentry, isdir);
return;
dentry_iput(dentry);
fsnotify_nameremove(dentry, isdir);
return;
This page took
0.025241 seconds
and
5
git commands to generate.