AFS: Fix VLocation record update wakeup
Subsystems (6)
David Howells
maintainerPATCH 1/3 AFS: Fix VLocation record update wakeup
Fix the wakeup transitions after a VLocation record update completes one way or another. This builds on Dave Miller's partial fix.
Also move wakeups outside the spinlocked sections.
---
fs/afs/vlocation.c | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-)
fs/afs/vlocation.c +8 -9
@@ -416,8 +416,8 @@ fill_in_record: goto error_abandon;spin_lock (&vl->lock); vl->state =AFS_VL_VALID ; -wake_up (&vl->waitq);spin_unlock (&vl->lock); +wake_up (&vl->waitq);/* schedule for regular updates */ afs_vlocation_queue_for_updates (vl);
@@ -442,7 +442,7 @@ found_in_memory:_debug ("invalid [state %d]" , state); -if ((state ==AFS_VL_NEW || state ==AFS_VL_NO_VOLUME )) { +if (state ==AFS_VL_NEW || state ==AFS_VL_NO_VOLUME ) { vl->state =AFS_VL_CREATING ;spin_unlock (&vl->lock); goto fill_in_record;
@@ -453,11 +453,10 @@ found_in_memory:_debug ("wait" );spin_unlock (&vl->lock); - ret =wait_event_interruptible ( - vl->waitq, - vl->state ==AFS_VL_NEW || - vl->state ==AFS_VL_VALID || - vl->state ==AFS_VL_NO_VOLUME ); + ret =wait_event_interruptible (vl->waitq, + vl->state ==AFS_VL_NEW || + vl->state ==AFS_VL_VALID || + vl->state ==AFS_VL_NO_VOLUME );if (ret <0 ) goto error;spin_lock (&vl->lock);
@@ -471,8 +470,8 @@ success: error_abandon:spin_lock (&vl->lock); vl->state =AFS_VL_NEW ; -wake_up (&vl->waitq);spin_unlock (&vl->lock); +wake_up (&vl->waitq); error:ASSERT (vl !=NULL );afs_put_vlocation (vl);
@@ -675,7 +674,6 @@ static void afs_vlocation_updater(struct work_struct *work)case 0 :afs_vlocation_apply_update (vl, &vldb); vl->state =AFS_VL_VALID ; -wake_up (&vl->waitq);break ;case -ENOMEDIUM : vl->state =AFS_VL_VOLUME_DELETED ;
@@ -685,6 +683,7 @@ static void afs_vlocation_updater(struct work_struct *work)break ; }spin_unlock (&vl->lock); +wake_up (&vl->waitq);/* and then reschedule */ _debug ("reschedule" );
David Howells
maintainerPATCH 3/3 NET: Fix networking compilation errors
Fix miscellaneous networking compilation errors.
(*) Export ktime_add_ns() for modules.
(*) wext_proc_init() should have an ANSI declaration.
---
include/net/wext.h | 2 +- kernel/hrtimer.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)
include/net/wext.h +1 -1
@@ -10,7 +10,7 @@ extern int wext_proc_init(void);extern int wext_handle_ioctl (struct ifreq *ifr,unsigned int cmd,void __user *arg);#else -static inline int wext_proc_init () +static inline int wext_proc_init (void ) {return 0 ; }
kernel/hrtimer.c +2 -0
@@ -279,6 +279,8 @@ ktime_t ktime_add_ns(const ktime_t kt, u64 nsec) return ktime_add(kt, tmp); } + +EXPORT_SYMBOL_GPL (ktime_add_ns);# endif /* !CONFIG_KTIME_SCALAR */ /*
David Howells
maintainerPATCH 2/3 AF_RXRPC/AFS: Arch-specific fixes
In reply to David HowellsFixes for various arch compilation problems:
(*) Missing module exports.
(*) Variable name collision when rxkad and af_rxrpc both built in
(rxrpc_debug).
(*) Large constant representation problem (AFS_UUID_TO_UNIX_TIME).
(*) Configuration dependencies.
(*) printk() format warnings.
---
arch/ia64/lib/csum_partial_copy.c | 2 ++ fs/Kconfig | 1 + fs/afs/internal.h | 2 +- fs/afs/rxrpc.c | 2 +- fs/afs/use-rtnetlink.c | 2 +- net/rxrpc/Kconfig | 5 +++++ net/rxrpc/rxkad.c | 1 + 7 files changed, 12 insertions(+), 3 deletions(-)
arch/ia64/lib/csum_partial_copy.c +2 -0
@@ -128,6 +128,8 @@ csum_partial_copy_from_user(const void __user *src, void *dst,return (__force __wsum )result; } +EXPORT_SYMBOL (csum_partial_copy_from_user); +__wsum csum_partial_copy_nocheck (const void *src,void *dst,int len,__wsum sum) {
fs/Kconfig +1 -0
@@ -2020,6 +2020,7 @@ config AFS_FS tristate "Andrew File System support (AFS) (EXPERIMENTAL)" depends on INET && EXPERIMENTAL select AF_RXRPC + select KEYS help If you say Y here, you will get an experimental Andrew File System driver. It currently only supports unsecured read-only AFS access.
fs/afs/internal.h +1 -1
@@ -367,7 +367,7 @@ struct afs_uuid {u32 time_low;/* low part of timestamp */ u16 time_mid;/* mid part of timestamp */ u16 time_hi_and_version;/* high part of timestamp and version */ -#define AFS_UUID_TO_UNIX_TIME 0x01b21dd213814000 +#define AFS_UUID_TO_UNIX_TIME 0x01b21dd213814000ULL#define AFS_UUID_TIMEHI_MASK 0x0fff#define AFS_UUID_VERSION_TIME 0x1000/* time-based UUID */ #define AFS_UUID_VERSION_NAME 0x3000/* name-based UUID */
fs/afs/rxrpc.c +1 -1
@@ -772,7 +772,7 @@ int afs_extract_data(struct afs_call *call, struct sk_buff *skb,if (call->offset < count) {if (last) { -_leave (" = -EBADMSG [%d < %lu]" , call->offset, count); +_leave (" = -EBADMSG [%d < %zu]" , call->offset, count);return -EBADMSG ; }_leave (" = -EAGAIN" );
fs/afs/use-rtnetlink.c +1 -1
@@ -243,7 +243,7 @@ static int afs_read_rtm(struct afs_rtm_desc *desc) desc->datalen =kernel_recvmsg (desc->nlsock, &msg, iov,1 , desc->datamax,0 );if (desc->datalen <0 ) { -_leave (" = %ld [recv]" , desc->datalen); +_leave (" = %zd [recv]" , desc->datalen);return desc->datalen; }
net/rxrpc/Kconfig +5 -0
@@ -30,6 +30,11 @@ config AF_RXRPC_DEBUG config RXKAD tristate "RxRPC Kerberos security" depends on AF_RXRPC && KEYS + select CRYPTO + select CRYPTO_MANAGER + select CRYPTO_BLKCIPHER + select CRYPTO_PCBC + select CRYPTO_FCRYPT help Provide kerberos 4 and AFS kaserver security handling for AF_RXRPC through the use of the key retention service.
net/rxrpc/rxkad.c +1 -0
@@ -18,6 +18,7 @@#include <linux/ctype.h> #include <net/sock.h> #include <net/af_rxrpc.h> +#define rxrpc_debug rxkad_debug#include "ar-internal.h" #define RXKAD_VERSION 2
From: David Howells <[email protected]>
Date: Fri, 27 Apr 2007 15:31:35 +0100
Quoted 4 lines
Fix the wakeup transitions after a VLocation record update completes one way or another. This builds on Dave Miller's partial fix.
Also move wakeups outside the spinlocked sections.
Applied, thanks David, although a minor nit.
Quoted 1 line
Signed-off-by David Howells <[email protected]>
The canonical signoff line does not capitalize Off and By, I keep fixing this up in your submissions so I figured I should let you know about it to save me some typing in the future :-)
David Miller
maintainerRe: [PATCH 2/3] AF_RXRPC/AFS: Arch-specific fixes
In reply to David HowellsFrom: David Howells <[email protected]>
Date: Fri, 27 Apr 2007 15:31:40 +0100
Quoted 7 lines
Fixes for various arch compilation problems:
(*) Missing module exports.
(*) Variable name collision when rxkad and
af_rxrpcboth built in(rxrpc_debug).
Quoted 7 lines
(*) Large constant representation problem (
AFS_UUID_TO_UNIX_TIME).(*) Configuration dependencies.
(*)
printk()format warnings.Signed-off-by David Howells <[email protected]>
Applied to fix the build failures, but you have to do some of this better, for example:
net/rxrpc/rxkad.c line 22
Quoted 10 lines
net/rxrpc/rxkad.c +1
-0@@ -18,6 +18,7 @@#include <linux/ctype.h> #include <net/sock.h> #include <net/af_rxrpc.h> +#define rxrpc_debug rxkad_debug#include "ar-internal.h"
Please stop with this CPP macro stuff, it's really crap'ifying your otherwise quite nice code.
Just use rxkad_debug in all the uses, splitting out things properly.
THanks.
David Miller
maintainerRe: [PATCH 3/3] NET: Fix networking compilation errors
In reply to David HowellsFrom: David Howells <[email protected]>
Date: Fri, 27 Apr 2007 15:31:45 +0100
Quoted 7 lines
Fix miscellaneous networking compilation errors.
(*) Export
ktime_add_ns()for modules.(*)
wext_proc_init()should have an ANSI declaration.Signed-off-by David Howells <[email protected]>
Also applied, thanks David.