projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfsd: fix possible read-ahead cache and export table corruption
[powerpc.git]
/
fs
/
dquot.c
diff --git
a/fs/dquot.c
b/fs/dquot.c
index
3a99584
..
7e27315
100644
(file)
--- a/
fs/dquot.c
+++ b/
fs/dquot.c
@@
-538,6
+538,11
@@
static int shrink_dqcache_memory(int nr, gfp_t gfp_mask)
return (dqstats.free_dquots / 100) * sysctl_vfs_cache_pressure;
}
return (dqstats.free_dquots / 100) * sysctl_vfs_cache_pressure;
}
+static struct shrinker dqcache_shrinker = {
+ .shrink = shrink_dqcache_memory,
+ .seeks = DEFAULT_SEEKS,
+};
+
/*
* Put reference to dquot
* NOTE: If you change this function please check whether dqput_blocks() works right...
/*
* Put reference to dquot
* NOTE: If you change this function please check whether dqput_blocks() works right...
@@
-1421,7
+1426,7
@@
int vfs_quota_off(struct super_block *sb, int type)
/* If quota was reenabled in the meantime, we have
* nothing to do */
if (!sb_has_quota_enabled(sb, cnt)) {
/* If quota was reenabled in the meantime, we have
* nothing to do */
if (!sb_has_quota_enabled(sb, cnt)) {
- mutex_lock
(&toputinode[cnt]->i_mutex
);
+ mutex_lock
_nested(&toputinode[cnt]->i_mutex, I_MUTEX_QUOTA
);
toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
S_NOATIME | S_NOQUOTA);
truncate_inode_pages(&toputinode[cnt]->i_data, 0);
toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
S_NOATIME | S_NOQUOTA);
truncate_inode_pages(&toputinode[cnt]->i_data, 0);
@@
-1870,7
+1875,7
@@
static int __init dquot_init(void)
printk("Dquot-cache hash table entries: %ld (order %ld, %ld bytes)\n",
nr_hash, order, (PAGE_SIZE << order));
printk("Dquot-cache hash table entries: %ld (order %ld, %ld bytes)\n",
nr_hash, order, (PAGE_SIZE << order));
-
set_shrinker(DEFAULT_SEEKS, shrink_dqcache_memory
);
+
register_shrinker(&dqcache_shrinker
);
return 0;
}
return 0;
}