diff options
-rw-r--r-- | fs/nfsd/nfs4idmap.c | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/cache.h | 3 | ||||
-rw-r--r-- | net/sunrpc/cache.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c index 5b398421b051..e9012ad36ac0 100644 --- a/fs/nfsd/nfs4idmap.c +++ b/fs/nfsd/nfs4idmap.c | |||
@@ -175,10 +175,10 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h) | |||
175 | } | 175 | } |
176 | 176 | ||
177 | static void | 177 | static void |
178 | warn_no_idmapd(struct cache_detail *detail) | 178 | warn_no_idmapd(struct cache_detail *detail, int has_died) |
179 | { | 179 | { |
180 | printk("nfsd: nfsv4 idmapping failing: has idmapd %s?\n", | 180 | printk("nfsd: nfsv4 idmapping failing: has idmapd %s?\n", |
181 | detail->last_close? "died" : "not been started"); | 181 | has_died ? "died" : "not been started"); |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 2d8b211b9324..3d1fad22185a 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -79,6 +79,8 @@ struct cache_detail { | |||
79 | int (*cache_show)(struct seq_file *m, | 79 | int (*cache_show)(struct seq_file *m, |
80 | struct cache_detail *cd, | 80 | struct cache_detail *cd, |
81 | struct cache_head *h); | 81 | struct cache_head *h); |
82 | void (*warn_no_listener)(struct cache_detail *cd, | ||
83 | int has_died); | ||
82 | 84 | ||
83 | struct cache_head * (*alloc)(void); | 85 | struct cache_head * (*alloc)(void); |
84 | int (*match)(struct cache_head *orig, struct cache_head *new); | 86 | int (*match)(struct cache_head *orig, struct cache_head *new); |
@@ -102,7 +104,6 @@ struct cache_detail { | |||
102 | atomic_t readers; /* how many time is /chennel open */ | 104 | atomic_t readers; /* how many time is /chennel open */ |
103 | time_t last_close; /* if no readers, when did last close */ | 105 | time_t last_close; /* if no readers, when did last close */ |
104 | time_t last_warn; /* when we last warned about no readers */ | 106 | time_t last_warn; /* when we last warned about no readers */ |
105 | void (*warn_no_listener)(struct cache_detail *cd); | ||
106 | }; | 107 | }; |
107 | 108 | ||
108 | 109 | ||
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index ff0c23053d2f..8ede4a6f384b 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -1020,7 +1020,7 @@ static void warn_no_listener(struct cache_detail *detail) | |||
1020 | if (detail->last_warn != detail->last_close) { | 1020 | if (detail->last_warn != detail->last_close) { |
1021 | detail->last_warn = detail->last_close; | 1021 | detail->last_warn = detail->last_close; |
1022 | if (detail->warn_no_listener) | 1022 | if (detail->warn_no_listener) |
1023 | detail->warn_no_listener(detail); | 1023 | detail->warn_no_listener(detail, detail->last_close != 0); |
1024 | } | 1024 | } |
1025 | } | 1025 | } |
1026 | 1026 | ||