projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SUNRPC: rpc_create() default hostname should support AF_INET6 addresses
[powerpc.git]
/
net
/
sunrpc
/
cache.c
diff --git
a/net/sunrpc/cache.c
b/net/sunrpc/cache.c
index
01c3c41
..
73f053d
100644
(file)
--- a/
net/sunrpc/cache.c
+++ b/
net/sunrpc/cache.c
@@
-371,8
+371,7
@@
int cache_unregister(struct cache_detail *cd)
}
if (list_empty(&cache_list)) {
/* module must be being unloaded so its safe to kill the worker */
}
if (list_empty(&cache_list)) {
/* module must be being unloaded so its safe to kill the worker */
- cancel_delayed_work(&cache_cleaner);
- flush_scheduled_work();
+ cancel_delayed_work_sync(&cache_cleaner);
}
return 0;
}
}
return 0;
}
@@
-1128,6
+1127,7
@@
struct handle {
};
static void *c_start(struct seq_file *m, loff_t *pos)
};
static void *c_start(struct seq_file *m, loff_t *pos)
+ __acquires(cd->hash_lock)
{
loff_t n = *pos;
unsigned hash, entry;
{
loff_t n = *pos;
unsigned hash, entry;
@@
-1184,6
+1184,7
@@
static void *c_next(struct seq_file *m, void *p, loff_t *pos)
}
static void c_stop(struct seq_file *m, void *p)
}
static void c_stop(struct seq_file *m, void *p)
+ __releases(cd->hash_lock)
{
struct cache_detail *cd = ((struct handle*)m->private)->cd;
read_unlock(&cd->hash_lock);
{
struct cache_detail *cd = ((struct handle*)m->private)->cd;
read_unlock(&cd->hash_lock);
@@
-1219,23
+1220,15
@@
static const struct seq_operations cache_content_op = {
static int content_open(struct inode *inode, struct file *file)
{
static int content_open(struct inode *inode, struct file *file)
{
- int res;
struct handle *han;
struct cache_detail *cd = PDE(inode)->data;
struct handle *han;
struct cache_detail *cd = PDE(inode)->data;
- han =
kmalloc(sizeof(*han), GFP_KERNEL
);
+ han =
__seq_open_private(file, &cache_content_op, sizeof(*han)
);
if (han == NULL)
return -ENOMEM;
han->cd = cd;
if (han == NULL)
return -ENOMEM;
han->cd = cd;
-
- res = seq_open(file, &cache_content_op);
- if (res)
- kfree(han);
- else
- ((struct seq_file *)file->private_data)->private = han;
-
- return res;
+ return 0;
}
static const struct file_operations content_file_operations = {
}
static const struct file_operations content_file_operations = {