From: J. Bruce Fields Date: Fri, 21 Aug 2009 15:27:29 +0000 (-0400) Subject: Merge branch 'nfs-for-2.6.32' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6... X-Git-Tag: v2.6.32-rc1~412^2~48 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=e9dc122166b8d863d3057a66ada04838e5548e52 Merge branch 'nfs-for-2.6.32' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 into for-2.6.32-incoming Conflicts: net/sunrpc/cache.c --- e9dc122166b8d863d3057a66ada04838e5548e52 diff --cc net/sunrpc/cache.c index bbd31f1,45cdaff..ade8a7e --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@@ -175,23 -177,13 +177,29 @@@ struct cache_head *sunrpc_cache_update( } EXPORT_SYMBOL_GPL(sunrpc_cache_update); - static int cache_make_upcall(struct cache_detail *detail, struct cache_head *h); + static int cache_make_upcall(struct cache_detail *cd, struct cache_head *h) + { + if (!cd->cache_upcall) + return -EINVAL; + return cd->cache_upcall(cd, h); + } +static inline int cache_is_valid(struct cache_detail *detail, struct cache_head *h) +{ + if (!test_bit(CACHE_VALID, &h->flags) || + h->expiry_time < get_seconds()) + return -EAGAIN; + else if (detail->flush_time > h->last_refresh) + return -EAGAIN; + else { + /* entry is valid */ + if (test_bit(CACHE_NEGATIVE, &h->flags)) + return -ENOENT; + else + return 0; + } +} ++ /* * This is the generic cache management routine for all * the authentication caches. @@@ -924,19 -887,7 +903,7 @@@ static int cache_release(struct inode * - static const struct file_operations cache_file_operations = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = cache_read, - .write = cache_write, - .poll = cache_poll, - .ioctl = cache_ioctl, /* for FIONREAD */ - .open = cache_open, - .release = cache_release, - }; - - -static void queue_loose(struct cache_detail *detail, struct cache_head *ch) +static void cache_dequeue(struct cache_detail *detail, struct cache_head *ch) { struct cache_queue *cq; spin_lock(&queue_lock);