Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132040
b: refs/heads/master
c: e7d3ef1
h: refs/heads/master
v: v3
  • Loading branch information
Stuart Hayes authored and Jeff Garzik committed Mar 5, 2009
1 parent a784171 commit 94f0136
Show file tree
Hide file tree
Showing 18 changed files with 91 additions and 109 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: d0cdb070ced5453fd1790d83c32bdc59d8ff9375
refs/heads/master: e7d3ef13d52a126438f687a1a32da65ff926ed57
2 changes: 1 addition & 1 deletion trunk/Documentation/filesystems/squashfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Squashfs filesystem features versus Cramfs:

Squashfs Cramfs

Max filesystem size: 2^64 256 MiB
Max filesystem size: 2^64 16 MiB
Max file size: ~ 2 TiB 16 MiB
Max files: unlimited unlimited
Max directories: unlimited unlimited
Expand Down
7 changes: 4 additions & 3 deletions trunk/arch/ia64/sn/pci/pcibr/pcibr_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ pcibr_dmatrans_direct64(struct pcidev_info * info, u64 paddr,
if (SN_DMA_ADDRTYPE(dma_flags) == SN_DMA_ADDR_PHYS)
pci_addr = IS_PIC_SOFT(pcibus_info) ?
PHYS_TO_DMA(paddr) :
PHYS_TO_TIODMA(paddr);
PHYS_TO_TIODMA(paddr) | dma_attributes;
else
pci_addr = paddr;
pci_addr |= dma_attributes;
pci_addr = IS_PIC_SOFT(pcibus_info) ?
paddr :
paddr | dma_attributes;

/* Handle Bus mode */
if (IS_PCIX(pcibus_info))
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/mips/include/asm/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
/*
* Architecture specific compatibility types
*/
#include <linux/seccomp.h>
#include <linux/thread_info.h>
#include <linux/types.h>
#include <asm/page.h>
#include <asm/ptrace.h>
Expand Down Expand Up @@ -220,9 +218,4 @@ struct compat_shmid64_ds {
compat_ulong_t __unused2;
};

static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}

#endif /* _ASM_COMPAT_H */
25 changes: 16 additions & 9 deletions trunk/block/blk-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ void blk_recalc_rq_sectors(struct request *rq, int nsect)
}

static unsigned int __blk_recalc_rq_segments(struct request_queue *q,
struct bio *bio)
struct bio *bio,
unsigned int *seg_size_ptr)
{
unsigned int phys_size;
struct bio_vec *bv, *bvprv = NULL;
int cluster, i, high, highprv = 1;
unsigned int seg_size, nr_phys_segs;
struct bio *fbio, *bbio;
struct bio *fbio;

if (!bio)
return 0;
Expand Down Expand Up @@ -86,28 +87,34 @@ static unsigned int __blk_recalc_rq_segments(struct request_queue *q,
seg_size = bv->bv_len;
highprv = high;
}
bbio = bio;
}

if (nr_phys_segs == 1 && seg_size > fbio->bi_seg_front_size)
fbio->bi_seg_front_size = seg_size;
if (seg_size > bbio->bi_seg_back_size)
bbio->bi_seg_back_size = seg_size;
if (seg_size_ptr)
*seg_size_ptr = seg_size;

return nr_phys_segs;
}

void blk_recalc_rq_segments(struct request *rq)
{
rq->nr_phys_segments = __blk_recalc_rq_segments(rq->q, rq->bio);
unsigned int seg_size = 0, phys_segs;

phys_segs = __blk_recalc_rq_segments(rq->q, rq->bio, &seg_size);

if (phys_segs == 1 && seg_size > rq->bio->bi_seg_front_size)
rq->bio->bi_seg_front_size = seg_size;
if (seg_size > rq->biotail->bi_seg_back_size)
rq->biotail->bi_seg_back_size = seg_size;

rq->nr_phys_segments = phys_segs;
}

void blk_recount_segments(struct request_queue *q, struct bio *bio)
{
struct bio *nxt = bio->bi_next;

bio->bi_next = NULL;
bio->bi_phys_segments = __blk_recalc_rq_segments(q, bio);
bio->bi_phys_segments = __blk_recalc_rq_segments(q, bio, NULL);
bio->bi_next = nxt;
bio->bi_flags |= (1 << BIO_SEG_VALID);
}
Expand Down
8 changes: 5 additions & 3 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3606,9 +3606,11 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
if (cciss_hard_reset_controller(pdev) || cciss_reset_msi(pdev))
return -ENODEV;

/* Now try to get the controller to respond to a no-op. Some
devices (notably the HP Smart Array 5i Controller) need
up to 30 seconds to respond. */
/* Some devices (notably the HP Smart Array 5i Controller)
need a little pause here */
schedule_timeout_uninterruptible(30*HZ);

/* Now try to get the controller to respond to a no-op */
for (i=0; i<30; i++) {
if (cciss_noop(pdev) == 0)
break;
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ lo_splice_actor(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
struct loop_device *lo = p->lo;
struct page *page = buf->page;
sector_t IV;
int size, ret;
size_t size;
int ret;

ret = buf->ops->confirm(pipe, buf);
if (unlikely(ret))
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,6 @@ static void backend_changed(struct xenbus_device *dev,
break;

case XenbusStateClosing:
if (info->gd == NULL)
xenbus_dev_fatal(dev, -ENODEV, "gd is NULL");
bd = bdget_disk(info->gd, 0);
if (bd == NULL)
xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
Expand Down
13 changes: 2 additions & 11 deletions trunk/fs/squashfs/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static struct buffer_head *get_block_length(struct super_block *sb,
* generated a larger block - this does occasionally happen with zlib).
*/
int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
int length, u64 *next_index, int srclength, int pages)
int length, u64 *next_index, int srclength)
{
struct squashfs_sb_info *msblk = sb->s_fs_info;
struct buffer_head **bh;
Expand Down Expand Up @@ -185,14 +185,6 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
}

if (msblk->stream.avail_out == 0) {
if (page == pages) {
ERROR("zlib_inflate tried to "
"decompress too much data, "
"expected %d bytes. Zlib "
"data probably corrupt\n",
srclength);
goto release_mutex;
}
msblk->stream.next_out = buffer[page++];
msblk->stream.avail_out = PAGE_CACHE_SIZE;
}
Expand Down Expand Up @@ -276,8 +268,7 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index,
put_bh(bh[k]);

read_failure:
ERROR("squashfs_read_data failed to read block 0x%llx\n",
(unsigned long long) index);
ERROR("sb_bread failed reading block 0x%llx\n", cur_index);
kfree(bh);
return -EIO;
}
4 changes: 2 additions & 2 deletions trunk/fs/squashfs/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ struct squashfs_cache_entry *squashfs_cache_get(struct super_block *sb,

entry->length = squashfs_read_data(sb, entry->data,
block, length, &entry->next_index,
cache->block_size, cache->pages);
cache->block_size);

spin_lock(&cache->lock);

Expand Down Expand Up @@ -406,7 +406,7 @@ int squashfs_read_table(struct super_block *sb, void *buffer, u64 block,
for (i = 0; i < pages; i++, buffer += PAGE_CACHE_SIZE)
data[i] = buffer;
res = squashfs_read_data(sb, data, block, length |
SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length, pages);
SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length);
kfree(data);
return res;
}
6 changes: 2 additions & 4 deletions trunk/fs/squashfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ int squashfs_read_inode(struct inode *inode, long long ino)
type = le16_to_cpu(sqshb_ino->inode_type);
switch (type) {
case SQUASHFS_REG_TYPE: {
unsigned int frag_offset, frag;
int frag_size;
unsigned int frag_offset, frag_size, frag;
u64 frag_blk;
struct squashfs_reg_inode *sqsh_ino = &squashfs_ino.reg;

Expand Down Expand Up @@ -176,8 +175,7 @@ int squashfs_read_inode(struct inode *inode, long long ino)
break;
}
case SQUASHFS_LREG_TYPE: {
unsigned int frag_offset, frag;
int frag_size;
unsigned int frag_offset, frag_size, frag;
u64 frag_blk;
struct squashfs_lreg_inode *sqsh_ino = &squashfs_ino.lreg;

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/squashfs/squashfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static inline struct squashfs_inode_info *squashfs_i(struct inode *inode)

/* block.c */
extern int squashfs_read_data(struct super_block *, void **, u64, int, u64 *,
int, int);
int);

/* cache.c */
extern struct squashfs_cache *squashfs_cache_init(char *, int, int);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/squashfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static int __init init_squashfs_fs(void)
return err;
}

printk(KERN_INFO "squashfs: version 4.0 (2009/01/31) "
printk(KERN_INFO "squashfs: version 4.0 (2009/01/03) "
"Phillip Lougher\n");

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ enum {
* advised to wait only for the following duration before
* doing SRST.
*/
ATA_TMOUT_PMP_SRST_WAIT = 1000,
ATA_TMOUT_PMP_SRST_WAIT = 5000,

/* ATA bus states */
BUS_UNKNOWN = 0,
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/serio.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ static inline void serio_unpin_driver(struct serio *serio)
#define SERIO_FUJITSU 0x35
#define SERIO_ZHENHUA 0x36
#define SERIO_INEXIO 0x37
#define SERIO_TOUCHIT213 0x38
#define SERIO_TOUCHIT213 0x37
#define SERIO_W8001 0x39

#endif
43 changes: 35 additions & 8 deletions trunk/security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1498,31 +1498,58 @@ static int smack_socket_post_create(struct socket *sock, int family,
* looks for host based access restrictions
*
* This version will only be appropriate for really small
* sets of single label hosts.
* sets of single label hosts. Because of the masking
* it cannot shortcut out on the first match. There are
* numerious ways to address the problem, but none of them
* have been applied here.
*
* Returns the label of the far end or NULL if it's not special.
*/
static char *smack_host_label(struct sockaddr_in *sip)
{
struct smk_netlbladdr *snp;
char *bestlabel = NULL;
struct in_addr *siap = &sip->sin_addr;
struct in_addr *liap;
struct in_addr *miap;
struct in_addr bestmask;

if (siap->s_addr == 0)
return NULL;

bestmask.s_addr = 0;

for (snp = smack_netlbladdrs; snp != NULL; snp = snp->smk_next) {
liap = &snp->smk_host.sin_addr;
miap = &snp->smk_mask;
/*
* If the addresses match after applying the list entry mask
* the entry matches the address. If it doesn't move along to
* the next entry.
*/
if ((liap->s_addr & miap->s_addr) !=
(siap->s_addr & miap->s_addr))
continue;
/*
* we break after finding the first match because
* the list is sorted from longest to shortest mask
* so we have found the most specific match
* If the list entry mask identifies a single address
* it can't get any more specific.
*/
if ((&snp->smk_host.sin_addr)->s_addr ==
(siap->s_addr & (&snp->smk_mask)->s_addr)) {
if (miap->s_addr == 0xffffffff)
return snp->smk_label;
}
/*
* If the list entry mask is less specific than the best
* already found this entry is uninteresting.
*/
if ((miap->s_addr | bestmask.s_addr) == bestmask.s_addr)
continue;
/*
* This is better than any entry found so far.
*/
bestmask.s_addr = miap->s_addr;
bestlabel = snp->smk_label;
}

return NULL;
return bestlabel;
}

/**
Expand Down
Loading

0 comments on commit 94f0136

Please sign in to comment.