Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14702
b: refs/heads/master
c: 42aacfb
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 26, 2005
1 parent d1277f9 commit 7814f98
Show file tree
Hide file tree
Showing 22 changed files with 107 additions and 99 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: cf65f1623dd005ddfb1cbba20af3423a6c638dbe
refs/heads/master: 42aacfba6c2d1ee773615cfcfce0fe973d1d0f37
16 changes: 10 additions & 6 deletions trunk/arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,17 @@ endif
LDFLAGS_vmlinux := -Bstatic

# The -Iarch/$(ARCH)/include is temporary while we are merging
CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
AFLAGS += -Iarch/$(ARCH)
CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe
CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include
AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple
CFLAGS += $(CFLAGS-y)
CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
CPPFLAGS += $(CPPFLAGS-y)
AFLAGS += $(AFLAGS-y)
CFLAGS += -msoft-float -pipe $(CFLAGS-y)
CPP = $(CC) -E $(CFLAGS)
# Temporary hack until we have migrated to asm-powerpc
LINUXINCLUDE += -Iarch/$(ARCH)/include
LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include
LINUXINCLUDE += $(LINUXINCLUDE-y)

CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__

Expand Down Expand Up @@ -173,11 +175,13 @@ 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@austin.ibm.com>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, 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@austin.ibm.com>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, 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@austin.ibm.com>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, 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@austin.ibm.com>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
*
* Based on pSeries_iommu.c:
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
*
* Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu.
*
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,17 @@ 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 && fb_logo.logo->height > yres) {
if (fb_logo.logo->height > yres) {
fb_logo.logo = NULL;
return 0;
}
Expand Down
26 changes: 12 additions & 14 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,11 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
/*
* Invalidate the local caches
*/
void
nfs_zap_caches(struct inode *inode)
static void nfs_zap_caches_locked(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 @@ -659,7 +656,12 @@ nfs_zap_caches(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 @@ -676,16 +678,13 @@ static void nfs_zap_acl_cache(struct inode *inode)
}

/*
* Invalidate, but do not unhash, the inode
* Invalidate, but do not unhash, the inode.
* NB: must be called with inode->i_lock held!
*/
static void
nfs_invalidate_inode(struct inode *inode)
static void nfs_invalidate_inode(struct inode *inode)
{
umode_t save_mode = inode->i_mode;

make_bad_inode(inode);
inode->i_mode = save_mode;
nfs_zap_caches(inode);
set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
nfs_zap_caches_locked(inode);
}

struct nfs_find_desc {
Expand Down Expand Up @@ -1528,14 +1527,13 @@ 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 (test_bit(NFS_DELEGATED_STATE, &state->flags)) {
if (NFS_I(state->inode)->delegation_state != 0) {
/* 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))
goto out;
return status;
}
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,12 +644,15 @@ 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;
INIT_LIST_HEAD(&new->list);
spin_lock(&sequence->lock);
list_add_tail(&new->list, &sequence->list);
spin_unlock(&sequence->lock);
}
return new;
}
Expand All @@ -658,12 +661,10 @@ void nfs_free_seqid(struct nfs_seqid *seqid)
{
struct rpc_sequence *sequence = seqid->sequence->sequence;

if (!list_empty(&seqid->list)) {
spin_lock(&sequence->lock);
list_del(&seqid->list);
spin_unlock(&sequence->lock);
}
rpc_wake_up_next(&sequence->wait);
spin_lock(&sequence->lock);
list_del(&seqid->list);
spin_unlock(&sequence->lock);
rpc_wake_up(&sequence->wait);
kfree(seqid);
}

Expand Down Expand Up @@ -722,11 +723,10 @@ 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 (!list_empty(&sequence->list)) {
if (sequence->list.next != &seqid->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: 6 additions & 7 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,12 @@ __linvfs_get_block(
int retpbbm = 1;
int error;

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;
if (blocks)
size = (ssize_t) min_t(xfs_off_t, LONG_MAX,
(xfs_off_t)blocks << inode->i_blkbits);
else
size = 1 << inode->i_blkbits;

VOP_BMAP(vp, offset, size,
create ? flags : BMAPI_READ, &iomap, &retpbbm, error);
Expand Down Expand Up @@ -1007,7 +1006,7 @@ __linvfs_get_block(
ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0);
offset = min_t(xfs_off_t,
iomap.iomap_bsize - iomap.iomap_delta,
blocks << inode->i_blkbits);
(xfs_off_t)blocks << inode->i_blkbits);
bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset);
}

Expand Down
11 changes: 8 additions & 3 deletions trunk/fs/xfs/xfs_attr_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ 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) {
if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname &&
!(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {
/*
* Last attribute now removed, revert to original
* inode format making all literal area available
Expand All @@ -328,7 +329,8 @@ 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);
ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname ||
(mp->m_flags & XFS_MOUNT_COMPAT_ATTR));
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 @@ -737,7 +739,8 @@ xfs_attr_shortform_allfit(xfs_dabuf_t *bp, xfs_inode_t *dp)
+ name_loc->namelen
+ INT_GET(name_loc->valuelen, ARCH_CONVERT);
}
if (bytes == sizeof(struct xfs_attr_sf_hdr))
if (!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR) &&
(bytes == sizeof(struct xfs_attr_sf_hdr)))
return(-1);
return(xfs_attr_shortform_bytesfit(dp, bytes));
}
Expand Down Expand Up @@ -775,6 +778,8 @@ 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) {
if (sb && !IS_ERR(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 */
size_t iomap_delta; /* offset into mapping, bytes */
xfs_off_t iomap_delta; /* offset into mapping, bytes */
iomap_flags_t iomap_flags;
} xfs_iomap_t;

Expand Down
36 changes: 12 additions & 24 deletions trunk/fs/xfs/xfs_log_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,8 @@ typedef struct log {

#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR)

#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)
{
#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \
{ \
if (type == 'w') { \
(log)->l_grant_write_bytes -= (bytes); \
if ((log)->l_grant_write_bytes < 0) { \
Expand All @@ -511,13 +509,9 @@ static inline void xlog_grant_sub_space(struct log *log, int bytes, int type)
(log)->l_grant_reserve_cycle--; \
} \
} \
}

#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)
{
}
#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \
{ \
if (type == 'w') { \
(log)->l_grant_write_bytes += (bytes); \
if ((log)->l_grant_write_bytes > (log)->l_logsize) { \
Expand All @@ -531,12 +525,9 @@ xlog_grant_add_space(struct log *log, int bytes, int type)
(log)->l_grant_reserve_cycle++; \
} \
} \
}

#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)
{ \
}
#define XLOG_INS_TICKETQ(q, tic) \
{ \
if (q) { \
(tic)->t_next = (q); \
(tic)->t_prev = (q)->t_prev; \
Expand All @@ -547,12 +538,9 @@ xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
(q) = (tic); \
} \
(tic)->t_flags |= XLOG_TIC_IN_Q; \
}

#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)
{ \
}
#define XLOG_DEL_TICKETQ(q, tic) \
{ \
if ((tic) == (tic)->t_next) { \
(q) = NULL; \
} else { \
Expand All @@ -562,7 +550,7 @@ xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic)
} \
(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);
Expand Down
Loading

0 comments on commit 7814f98

Please sign in to comment.