X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fafs%2Fvlocation.c;h=eced20618eccf2bfc23a1bc7d9b3abefc2ded9a1;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9cff6b6870704835a3798896c76a7dc8c56452c0;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 9cff6b687..eced20618 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c @@ -29,6 +29,7 @@ static void afs_vlocation_update_timer(struct afs_timer *timer); static void afs_vlocation_update_attend(struct afs_async_op *op); static void afs_vlocation_update_discard(struct afs_async_op *op); +static void __afs_put_vlocation(struct afs_vlocation *vlocation); static void __afs_vlocation_timeout(struct afs_timer *timer) { @@ -56,7 +57,7 @@ static const struct afs_async_op_ops afs_vlocation_update_op_ops = { static LIST_HEAD(afs_vlocation_update_pendq); /* queue of VLs awaiting update */ static struct afs_vlocation *afs_vlocation_update; /* VL currently being updated */ -static spinlock_t afs_vlocation_update_lock = SPIN_LOCK_UNLOCKED; /* lock guarding update queue */ +static DEFINE_SPINLOCK(afs_vlocation_update_lock); /* lock guarding update queue */ #ifdef AFS_CACHING_SUPPORT static cachefs_match_val_t afs_vlocation_cache_match(void *target, @@ -455,7 +456,7 @@ int afs_vlocation_lookup(struct afs_cell *cell, * finish using a volume location record * - caller must have cell->vol_sem write-locked */ -void __afs_put_vlocation(struct afs_vlocation *vlocation) +static void __afs_put_vlocation(struct afs_vlocation *vlocation) { struct afs_cell *cell; @@ -906,7 +907,7 @@ static cachefs_match_val_t afs_vlocation_cache_match(void *target, if (!vlocation->valid || vlocation->vldb.rtime == vldb->rtime ) { - struct_cpy(&vlocation->vldb, vldb); + vlocation->vldb = *vldb; vlocation->valid = 1; _leave(" = SUCCESS [c->m]"); return CACHEFS_MATCH_SUCCESS; @@ -947,7 +948,7 @@ static void afs_vlocation_cache_update(void *source, void *entry) _enter(""); - struct_cpy(vldb,&vlocation->vldb); + *vldb = vlocation->vldb; } /* end afs_vlocation_cache_update() */ #endif