Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14701
b: refs/heads/master
c: cf65f16
h: refs/heads/master
i:
  14699: a7bfab9
v: v3
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Nov 24, 2005
1 parent 2c43fb9 commit d1277f9
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 112 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3eb67a2ab4e14fc6cc035907400b86462d174db
refs/heads/master: cf65f1623dd005ddfb1cbba20af3423a6c638dbe
16 changes: 6 additions & 10 deletions trunk/arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)__

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/iseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Rewrite, cleanup:
*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
*
* Dynamic DMA mapping support, iSeries-specific parts.
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/pseries/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Rewrite, cleanup:
*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
*
* Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR.
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/sysdev/dart.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, 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
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/sysdev/u3_iommu.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* arch/powerpc/sysdev/u3_iommu.c
*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
*
* Based on pSeries_iommu.c:
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
*
* Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu.
*
Expand Down
16 changes: 11 additions & 5 deletions trunk/drivers/char/drm/drm_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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.
Expand All @@ -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;
}

/**
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
26 changes: 14 additions & 12 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
}

Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions trunk/fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}

Expand Down Expand Up @@ -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;
Expand Down
13 changes: 7 additions & 6 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
11 changes: 3 additions & 8 deletions trunk/fs/xfs/xfs_attr_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_iomap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading

0 comments on commit d1277f9

Please sign in to comment.