From d1277f9a2c3cc6195b4a3c0c8d04432b35b47b7e Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 24 Nov 2005 21:41:14 +1100 Subject: [PATCH] --- yaml --- r: 14701 b: refs/heads/master c: cf65f1623dd005ddfb1cbba20af3423a6c638dbe h: refs/heads/master i: 14699: a7bfab9a2ec5a8feeecb13d388c1b8b11ae07fb5 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/Makefile | 16 ++++----- trunk/arch/powerpc/mm/hugetlbpage.c | 2 +- trunk/arch/powerpc/platforms/iseries/iommu.c | 2 +- trunk/arch/powerpc/platforms/pseries/iommu.c | 2 +- trunk/arch/powerpc/sysdev/dart.h | 2 +- trunk/arch/powerpc/sysdev/u3_iommu.c | 4 +-- trunk/drivers/char/drm/drm_lock.c | 16 ++++++--- trunk/drivers/video/fbmem.c | 6 +--- trunk/fs/nfs/inode.c | 26 +++++++------- trunk/fs/nfs/nfs4proc.c | 6 ++-- trunk/fs/nfs/nfs4state.c | 20 +++++------ trunk/fs/xfs/linux-2.6/xfs_aops.c | 13 +++---- trunk/fs/xfs/xfs_attr_leaf.c | 11 ++---- trunk/fs/xfs/xfs_fsops.c | 2 +- trunk/fs/xfs/xfs_iomap.h | 2 +- trunk/fs/xfs/xfs_log_priv.h | 36 +++++++++++++------- trunk/fs/xfs/xfs_vnodeops.c | 5 ++- trunk/include/asm-arm/arch-iop3xx/timex.h | 2 +- trunk/include/asm-powerpc/iommu.h | 2 +- trunk/include/asm-powerpc/page_64.h | 17 ++++----- trunk/include/asm-powerpc/tce.h | 2 +- trunk/net/sunrpc/rpc_pipe.c | 26 ++++++-------- 23 files changed, 110 insertions(+), 112 deletions(-) diff --git a/[refs] b/[refs] index 55390b7dd3bd..da2f62fcdf81 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b3eb67a2ab4e14fc6cc035907400b86462d174db +refs/heads/master: cf65f1623dd005ddfb1cbba20af3423a6c638dbe diff --git a/trunk/arch/powerpc/Makefile b/trunk/arch/powerpc/Makefile index a13eb575f834..98f67c78d1bd 100644 --- a/trunk/arch/powerpc/Makefile +++ b/trunk/arch/powerpc/Makefile @@ -61,17 +61,15 @@ endif LDFLAGS_vmlinux := -Bstatic # The -Iarch/$(ARCH)/include is temporary while we are merging -CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include -AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) +CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include +AFLAGS += -Iarch/$(ARCH) +CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc -CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple -CPPFLAGS += $(CPPFLAGS-y) -AFLAGS += $(AFLAGS-y) -CFLAGS += -msoft-float -pipe $(CFLAGS-y) +CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple +CFLAGS += $(CFLAGS-y) CPP = $(CC) -E $(CFLAGS) # Temporary hack until we have migrated to asm-powerpc -LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include -LINUXINCLUDE += $(LINUXINCLUDE-y) +LINUXINCLUDE += -Iarch/$(ARCH)/include CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ @@ -175,13 +173,11 @@ archclean: archprepare: checkbin -ifeq ($(CONFIG_PPC32),y) # Temporary hack until we have migrated to asm-powerpc include/asm: arch/$(ARCH)/include/asm arch/$(ARCH)/include/asm: FORCE $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm -endif # Use the file '.tmp_gas_check' for binutils tests, as gas won't output # to stdout and these checks are run even on install targets. diff --git a/trunk/arch/powerpc/mm/hugetlbpage.c b/trunk/arch/powerpc/mm/hugetlbpage.c index 6bc9dbad7dea..f867bba893ca 100644 --- a/trunk/arch/powerpc/mm/hugetlbpage.c +++ b/trunk/arch/powerpc/mm/hugetlbpage.c @@ -295,7 +295,7 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len) if (addr < 0x100000000UL) err = open_low_hpage_areas(current->mm, LOW_ESID_MASK(addr, len)); - if ((addr + len) > 0x100000000UL) + if ((addr + len) >= 0x100000000UL) err = open_high_hpage_areas(current->mm, HTLB_AREA_MASK(addr, len)); if (err) { diff --git a/trunk/arch/powerpc/platforms/iseries/iommu.c b/trunk/arch/powerpc/platforms/iseries/iommu.c index 2b54eeb2c899..bf081b345820 100644 --- a/trunk/arch/powerpc/platforms/iseries/iommu.c +++ b/trunk/arch/powerpc/platforms/iseries/iommu.c @@ -3,7 +3,7 @@ * * Rewrite, cleanup: * - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * Dynamic DMA mapping support, iSeries-specific parts. * diff --git a/trunk/arch/powerpc/platforms/pseries/iommu.c b/trunk/arch/powerpc/platforms/pseries/iommu.c index c78f2b290a73..97ba5214417f 100644 --- a/trunk/arch/powerpc/platforms/pseries/iommu.c +++ b/trunk/arch/powerpc/platforms/pseries/iommu.c @@ -5,7 +5,7 @@ * * Rewrite, cleanup: * - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. * diff --git a/trunk/arch/powerpc/sysdev/dart.h b/trunk/arch/powerpc/sysdev/dart.h index 33ed9ed7fc1e..ea8f0d9eed8a 100644 --- a/trunk/arch/powerpc/sysdev/dart.h +++ b/trunk/arch/powerpc/sysdev/dart.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/trunk/arch/powerpc/sysdev/u3_iommu.c b/trunk/arch/powerpc/sysdev/u3_iommu.c index 5c1a26a6d00c..f32baf7f4693 100644 --- a/trunk/arch/powerpc/sysdev/u3_iommu.c +++ b/trunk/arch/powerpc/sysdev/u3_iommu.c @@ -1,11 +1,11 @@ /* * arch/powerpc/sysdev/u3_iommu.c * - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * Based on pSeries_iommu.c: * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. * diff --git a/trunk/drivers/char/drm/drm_lock.c b/trunk/drivers/char/drm/drm_lock.c index b276ae8a6633..b48a595d54ec 100644 --- a/trunk/drivers/char/drm/drm_lock.c +++ b/trunk/drivers/char/drm/drm_lock.c @@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp, __set_current_state(TASK_RUNNING); remove_wait_queue(&dev->lock.lock_queue, &entry); + DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); + if (ret) + return ret; + sigemptyset(&dev->sigmask); sigaddset(&dev->sigmask, SIGSTOP); sigaddset(&dev->sigmask, SIGTSTP); @@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp, if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) dev->driver->dma_ready(dev); - if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) - return dev->driver->dma_quiescent(dev); + if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { + if (dev->driver->dma_quiescent(dev)) { + DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context); + return DRM_ERR(EBUSY); + } + } /* dev->driver->kernel_context_switch isn't used by any of the x86 * drivers but is used by the Sparc driver. @@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp, dev->driver->kernel_context_switch(dev, dev->last_context, lock.context); } - DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); - - return ret; + return 0; } /** diff --git a/trunk/drivers/video/fbmem.c b/trunk/drivers/video/fbmem.c index 6240aedb4154..9f180096c896 100644 --- a/trunk/drivers/video/fbmem.c +++ b/trunk/drivers/video/fbmem.c @@ -452,17 +452,13 @@ int fb_prepare_logo(struct fb_info *info, int rotate) /* Return if no suitable logo was found */ fb_logo.logo = fb_find_logo(depth); - - if (!fb_logo.logo) { - return 0; - } if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) yres = info->var.yres; else yres = info->var.xres; - if (fb_logo.logo->height > yres) { + if (fb_logo.logo && fb_logo.logo->height > yres) { fb_logo.logo = NULL; return 0; } diff --git a/trunk/fs/nfs/inode.c b/trunk/fs/nfs/inode.c index aaab1a5ac461..6391d8964214 100644 --- a/trunk/fs/nfs/inode.c +++ b/trunk/fs/nfs/inode.c @@ -643,11 +643,14 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) /* * Invalidate the local caches */ -static void nfs_zap_caches_locked(struct inode *inode) +void +nfs_zap_caches(struct inode *inode) { struct nfs_inode *nfsi = NFS_I(inode); int mode = inode->i_mode; + spin_lock(&inode->i_lock); + NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); NFS_ATTRTIMEO_UPDATE(inode) = jiffies; @@ -656,12 +659,7 @@ static void nfs_zap_caches_locked(struct inode *inode) nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; else nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; -} -void nfs_zap_caches(struct inode *inode) -{ - spin_lock(&inode->i_lock); - nfs_zap_caches_locked(inode); spin_unlock(&inode->i_lock); } @@ -678,13 +676,16 @@ static void nfs_zap_acl_cache(struct inode *inode) } /* - * Invalidate, but do not unhash, the inode. - * NB: must be called with inode->i_lock held! + * Invalidate, but do not unhash, the inode */ -static void nfs_invalidate_inode(struct inode *inode) +static void +nfs_invalidate_inode(struct inode *inode) { - set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); - nfs_zap_caches_locked(inode); + umode_t save_mode = inode->i_mode; + + make_bad_inode(inode); + inode->i_mode = save_mode; + nfs_zap_caches(inode); } struct nfs_find_desc { @@ -1527,13 +1528,14 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); #endif - out_err: /* * No need to worry about unhashing the dentry, as the * lookup validation will know that the inode is bad. * (But we fall through to invalidate the caches.) */ nfs_invalidate_inode(inode); + out_err: + set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); return -ESTALE; } diff --git a/trunk/fs/nfs/nfs4proc.c b/trunk/fs/nfs/nfs4proc.c index 60e0dd800cc3..21482b2518f6 100644 --- a/trunk/fs/nfs/nfs4proc.c +++ b/trunk/fs/nfs/nfs4proc.c @@ -3071,15 +3071,15 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock struct nfs4_client *clp = state->owner->so_client; int status; + down_read(&clp->cl_sem); /* Is this a delegated open? */ - if (NFS_I(state->inode)->delegation_state != 0) { + if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { /* Yes: cache locks! */ status = do_vfs_lock(request->fl_file, request); /* ...but avoid races with delegation recall... */ if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) - return status; + goto out; } - down_read(&clp->cl_sem); status = nfs4_set_lock_state(state, request); if (status != 0) goto out; diff --git a/trunk/fs/nfs/nfs4state.c b/trunk/fs/nfs/nfs4state.c index 5ef4c57618fe..0675f3215e0a 100644 --- a/trunk/fs/nfs/nfs4state.c +++ b/trunk/fs/nfs/nfs4state.c @@ -644,15 +644,12 @@ void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t f struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter) { - struct rpc_sequence *sequence = counter->sequence; struct nfs_seqid *new; new = kmalloc(sizeof(*new), GFP_KERNEL); if (new != NULL) { new->sequence = counter; - spin_lock(&sequence->lock); - list_add_tail(&new->list, &sequence->list); - spin_unlock(&sequence->lock); + INIT_LIST_HEAD(&new->list); } return new; } @@ -661,10 +658,12 @@ void nfs_free_seqid(struct nfs_seqid *seqid) { struct rpc_sequence *sequence = seqid->sequence->sequence; - spin_lock(&sequence->lock); - list_del(&seqid->list); - spin_unlock(&sequence->lock); - rpc_wake_up(&sequence->wait); + if (!list_empty(&seqid->list)) { + spin_lock(&sequence->lock); + list_del(&seqid->list); + spin_unlock(&sequence->lock); + } + rpc_wake_up_next(&sequence->wait); kfree(seqid); } @@ -723,10 +722,11 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task) if (sequence->list.next == &seqid->list) goto out; spin_lock(&sequence->lock); - if (sequence->list.next != &seqid->list) { + if (!list_empty(&sequence->list)) { rpc_sleep_on(&sequence->wait, task, NULL, NULL); status = -EAGAIN; - } + } else + list_add(&seqid->list, &sequence->list); spin_unlock(&sequence->lock); out: return status; diff --git a/trunk/fs/xfs/linux-2.6/xfs_aops.c b/trunk/fs/xfs/linux-2.6/xfs_aops.c index 94d3cdfbf9b8..c6108971b4e6 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_aops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_aops.c @@ -941,12 +941,13 @@ __linvfs_get_block( int retpbbm = 1; int error; - offset = (xfs_off_t)iblock << inode->i_blkbits; - if (blocks) - size = (ssize_t) min_t(xfs_off_t, LONG_MAX, - (xfs_off_t)blocks << inode->i_blkbits); - else + if (blocks) { + offset = blocks << inode->i_blkbits; /* 64 bit goodness */ + size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX); + } else { size = 1 << inode->i_blkbits; + } + offset = (xfs_off_t)iblock << inode->i_blkbits; VOP_BMAP(vp, offset, size, create ? flags : BMAPI_READ, &iomap, &retpbbm, error); @@ -1006,7 +1007,7 @@ __linvfs_get_block( ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); offset = min_t(xfs_off_t, iomap.iomap_bsize - iomap.iomap_delta, - (xfs_off_t)blocks << inode->i_blkbits); + blocks << inode->i_blkbits); bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset); } diff --git a/trunk/fs/xfs/xfs_attr_leaf.c b/trunk/fs/xfs/xfs_attr_leaf.c index 1c7421840c18..35e557b00db2 100644 --- a/trunk/fs/xfs/xfs_attr_leaf.c +++ b/trunk/fs/xfs/xfs_attr_leaf.c @@ -310,8 +310,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args) * Fix up the start offset of the attribute fork */ totsize -= size; - if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname && - !(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) { + if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname) { /* * Last attribute now removed, revert to original * inode format making all literal area available @@ -329,8 +328,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args) xfs_idata_realloc(dp, -size, XFS_ATTR_FORK); dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize); ASSERT(dp->i_d.di_forkoff); - ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname || - (mp->m_flags & XFS_MOUNT_COMPAT_ATTR)); + ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname); dp->i_afp->if_ext_max = XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t); dp->i_df.if_ext_max = @@ -739,8 +737,7 @@ xfs_attr_shortform_allfit(xfs_dabuf_t *bp, xfs_inode_t *dp) + name_loc->namelen + INT_GET(name_loc->valuelen, ARCH_CONVERT); } - if (!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR) && - (bytes == sizeof(struct xfs_attr_sf_hdr))) + if (bytes == sizeof(struct xfs_attr_sf_hdr)) return(-1); return(xfs_attr_shortform_bytesfit(dp, bytes)); } @@ -778,8 +775,6 @@ xfs_attr_leaf_to_shortform(xfs_dabuf_t *bp, xfs_da_args_t *args, int forkoff) goto out; if (forkoff == -1) { - ASSERT(!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR)); - /* * Last attribute was removed, revert to original * inode format making all literal area available diff --git a/trunk/fs/xfs/xfs_fsops.c b/trunk/fs/xfs/xfs_fsops.c index d1236d6f4045..7ceabd0e2d9d 100644 --- a/trunk/fs/xfs/xfs_fsops.c +++ b/trunk/fs/xfs/xfs_fsops.c @@ -550,7 +550,7 @@ xfs_fs_goingdown( struct vfs *vfsp = XFS_MTOVFS(mp); struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); - if (sb && !IS_ERR(sb)) { + if (sb) { xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); thaw_bdev(sb->s_bdev, sb); } diff --git a/trunk/fs/xfs/xfs_iomap.h b/trunk/fs/xfs/xfs_iomap.h index 3ce204a524b0..fcd6d63bb68b 100644 --- a/trunk/fs/xfs/xfs_iomap.h +++ b/trunk/fs/xfs/xfs_iomap.h @@ -69,7 +69,7 @@ typedef struct xfs_iomap { xfs_buftarg_t *iomap_target; xfs_off_t iomap_offset; /* offset of mapping, bytes */ xfs_off_t iomap_bsize; /* size of mapping, bytes */ - xfs_off_t iomap_delta; /* offset into mapping, bytes */ + size_t iomap_delta; /* offset into mapping, bytes */ iomap_flags_t iomap_flags; } xfs_iomap_t; diff --git a/trunk/fs/xfs/xfs_log_priv.h b/trunk/fs/xfs/xfs_log_priv.h index 4518b188ade6..8f285149681f 100644 --- a/trunk/fs/xfs/xfs_log_priv.h +++ b/trunk/fs/xfs/xfs_log_priv.h @@ -494,8 +494,10 @@ typedef struct log { #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) -#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ - { \ +#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ + xlog_grant_sub_space(log,bytes,type) +static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) +{ if (type == 'w') { \ (log)->l_grant_write_bytes -= (bytes); \ if ((log)->l_grant_write_bytes < 0) { \ @@ -509,9 +511,13 @@ typedef struct log { (log)->l_grant_reserve_cycle--; \ } \ } \ - } -#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ - { \ +} + +#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ + xlog_grant_add_space(log,bytes,type) +static inline void +xlog_grant_add_space(struct log *log, int bytes, int type) +{ if (type == 'w') { \ (log)->l_grant_write_bytes += (bytes); \ if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ @@ -525,9 +531,12 @@ typedef struct log { (log)->l_grant_reserve_cycle++; \ } \ } \ - } -#define XLOG_INS_TICKETQ(q, tic) \ - { \ +} + +#define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic) +static inline void +xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) +{ \ if (q) { \ (tic)->t_next = (q); \ (tic)->t_prev = (q)->t_prev; \ @@ -538,9 +547,12 @@ typedef struct log { (q) = (tic); \ } \ (tic)->t_flags |= XLOG_TIC_IN_Q; \ - } -#define XLOG_DEL_TICKETQ(q, tic) \ - { \ +} + +#define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic) +static inline void +xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) +{ \ if ((tic) == (tic)->t_next) { \ (q) = NULL; \ } else { \ @@ -550,7 +562,7 @@ typedef struct log { } \ (tic)->t_next = (tic)->t_prev = NULL; \ (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ - } +} /* common routines */ extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); diff --git a/trunk/fs/xfs/xfs_vnodeops.c b/trunk/fs/xfs/xfs_vnodeops.c index e03fa2a3d5ed..7c1f74531463 100644 --- a/trunk/fs/xfs/xfs_vnodeops.c +++ b/trunk/fs/xfs/xfs_vnodeops.c @@ -3958,9 +3958,8 @@ xfs_finish_reclaim_all(xfs_mount_t *mp, int noblock) } } XFS_MOUNT_IUNLOCK(mp); - if (xfs_finish_reclaim(ip, noblock, - XFS_IFLUSH_DELWRI_ELSE_ASYNC)) - delay(1); + xfs_finish_reclaim(ip, noblock, + XFS_IFLUSH_DELWRI_ELSE_ASYNC); purged = 1; break; } diff --git a/trunk/include/asm-arm/arch-iop3xx/timex.h b/trunk/include/asm-arm/arch-iop3xx/timex.h index 472badb451c4..d4187fe9a85a 100644 --- a/trunk/include/asm-arm/arch-iop3xx/timex.h +++ b/trunk/include/asm-arm/arch-iop3xx/timex.h @@ -4,7 +4,7 @@ * IOP3xx architecture timex specifications */ #include -#include + #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) diff --git a/trunk/include/asm-powerpc/iommu.h b/trunk/include/asm-powerpc/iommu.h index f89f06050893..6a35e6570ccd 100644 --- a/trunk/include/asm-powerpc/iommu.h +++ b/trunk/include/asm-powerpc/iommu.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation * Rewrite, cleanup: - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/trunk/include/asm-powerpc/page_64.h b/trunk/include/asm-powerpc/page_64.h index 6642c0125001..58a3dd9a79ec 100644 --- a/trunk/include/asm-powerpc/page_64.h +++ b/trunk/include/asm-powerpc/page_64.h @@ -103,9 +103,8 @@ extern unsigned int HPAGE_SHIFT; #define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) #define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) -#define LOW_ESID_MASK(addr, len) \ - (((1U << (GET_ESID(min((addr)+(len)-1, 0x100000000UL))+1)) \ - - (1U << GET_ESID(min((addr), 0x100000000UL)))) & 0xffff) +#define LOW_ESID_MASK(addr, len) (((1U << (GET_ESID(addr+len-1)+1)) \ + - (1U << GET_ESID(addr))) & 0xffff) #define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ - (1U << GET_HTLB_AREA(addr))) & 0xffff) @@ -114,21 +113,17 @@ extern unsigned int HPAGE_SHIFT; #define ARCH_HAS_SETCLEAR_HUGE_PTE #define touches_hugepage_low_range(mm, addr, len) \ - (((addr) < 0x100000000UL) \ - && (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas)) + (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas) #define touches_hugepage_high_range(mm, addr, len) \ - ((((addr) + (len)) > 0x100000000UL) \ - && (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas)) + (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas) #define __within_hugepage_low_range(addr, len, segmask) \ - ( (((addr)+(len)) <= 0x100000000UL) \ - && ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask))) + ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)) #define within_hugepage_low_range(addr, len) \ __within_hugepage_low_range((addr), (len), \ current->mm->context.low_htlb_areas) #define __within_hugepage_high_range(addr, len, zonemask) \ - ( ((addr) >= 0x100000000UL) \ - && ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask))) + ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)) #define within_hugepage_high_range(addr, len) \ __within_hugepage_high_range((addr), (len), \ current->mm->context.high_htlb_areas) diff --git a/trunk/include/asm-powerpc/tce.h b/trunk/include/asm-powerpc/tce.h index 980a094fd5a7..d099d5200f9b 100644 --- a/trunk/include/asm-powerpc/tce.h +++ b/trunk/include/asm-powerpc/tce.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation * Rewrite, cleanup: - * Copyright (C) 2004 Olof Johansson , IBM Corporation + * Copyright (C) 2004 Olof Johansson , IBM Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/trunk/net/sunrpc/rpc_pipe.c b/trunk/net/sunrpc/rpc_pipe.c index e3b242daf53c..81e00a6c19de 100644 --- a/trunk/net/sunrpc/rpc_pipe.c +++ b/trunk/net/sunrpc/rpc_pipe.c @@ -39,27 +39,23 @@ static kmem_cache_t *rpc_inode_cachep __read_mostly; #define RPC_UPCALL_TIMEOUT (30*HZ) static void -__rpc_purge_list(struct rpc_inode *rpci, struct list_head *head, int err) +__rpc_purge_upcall(struct inode *inode, int err) { + struct rpc_inode *rpci = RPC_I(inode); struct rpc_pipe_msg *msg; - void (*destroy_msg)(struct rpc_pipe_msg *); - destroy_msg = rpci->ops->destroy_msg; - while (!list_empty(head)) { - msg = list_entry(head->next, struct rpc_pipe_msg, list); + while (!list_empty(&rpci->pipe)) { + msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); list_del_init(&msg->list); msg->errno = err; - destroy_msg(msg); + rpci->ops->destroy_msg(msg); + } + while (!list_empty(&rpci->in_upcall)) { + msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); + list_del_init(&msg->list); + msg->errno = err; + rpci->ops->destroy_msg(msg); } -} - -static void -__rpc_purge_upcall(struct inode *inode, int err) -{ - struct rpc_inode *rpci = RPC_I(inode); - - __rpc_purge_list(rpci, &rpci->pipe, err); - __rpc_purge_list(rpci, &rpci->in_upcall, err); rpci->pipelen = 0; wake_up(&rpci->waitq); }