Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45520
b: refs/heads/master
c: 8331191
h: refs/heads/master
v: v3
  • Loading branch information
Anton Altaparmakov committed Jan 18, 2007
1 parent a68c8fa commit 5c5efb8
Show file tree
Hide file tree
Showing 23 changed files with 96 additions and 141 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: a99d726bd0574991245fe7d38e8b11c41089eee4
refs/heads/master: 8331191e56802f0155772a3d56bc2a750acc38e1
2 changes: 2 additions & 0 deletions trunk/Documentation/filesystems/ntfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ ChangeLog

Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.

2.1.28:
- Fix a deadlock.
2.1.27:
- Implement page migration support so the kernel can move memory used
by NTFS files and directories around for management purposes.
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/char/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
{
unsigned long pfn;

/* Turn a kernel-virtual address into a physical page frame */
pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
/* Turn a pfn offset into an absolute pfn */
pfn = PFN_DOWN(virt_to_phys((void *)PAGE_OFFSET)) + vma->vm_pgoff;

/*
* RED-PEN: on some architectures there is more mapped memory
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/cx88/cx88-tvaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/errno.h>
#include <linux/freezer.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
Expand Down Expand Up @@ -962,7 +961,6 @@ int cx88_audio_thread(void *data)
msleep_interruptible(1000);
if (kthread_should_stop())
break;
try_to_freeze();

/* just monitor the audio status for now ... */
memset(&t, 0, sizeof(t));
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/media/video/ks0127.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,13 +712,13 @@ static int ks0127_command(struct i2c_client *client,
*iarg = 0;
status = ks0127_read(ks, KS_STAT);
if (!(status & 0x20)) /* NOVID not set */
*iarg = (*iarg | DECODER_STATUS_GOOD);
*iarg = (*iarg & DECODER_STATUS_GOOD);
if ((status & 0x01)) /* CLOCK set */
*iarg = (*iarg | DECODER_STATUS_COLOR);
*iarg = (*iarg & DECODER_STATUS_COLOR);
if ((status & 0x08)) /* PALDET set */
*iarg = (*iarg | DECODER_STATUS_PAL);
*iarg = (*iarg & DECODER_STATUS_PAL);
else
*iarg = (*iarg | DECODER_STATUS_NTSC);
*iarg = (*iarg & DECODER_STATUS_NTSC);
break;

//Catch any unknown command
Expand Down
14 changes: 4 additions & 10 deletions trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,6 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.gpiomask = 1 << 21,
.inputs = {{
.name = name_tv,
.vmux = 1,
Expand All @@ -2579,20 +2578,15 @@ struct saa7134_board saa7134_boards[] = {
},{
.name = name_comp1,
.vmux = 3,
.amux = LINE2, /* unconfirmed, taken from Philips driver */
},{
.name = name_comp2,
.vmux = 0, /* untested, Composite over S-Video */
.amux = LINE2,
.amux = LINE1,
},{
.name = name_svideo,
.vmux = 8,
.amux = LINE2,
.vmux = 0,
.amux = LINE1,
}},
.radio = {
.name = name_radio,
.amux = TV,
.gpio = 0x0200000,
.amux = LINE1,
},
},
[SAA7134_BOARD_CINERGY250PCI] = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tveeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ hauppauge_tuner[] =
{ TUNER_ABSENT, "Thompson DTT757"},
/* 80-89 */
{ TUNER_ABSENT, "Philips FQ1216LME MK3"},
{ TUNER_LG_PAL_NEW_TAPC, "LG TAPC G701D"},
{ TUNER_ABSENT, "LG TAPC G701D"},
{ TUNER_LG_NTSC_NEW_TAPC, "LG TAPC H791F"},
{ TUNER_LG_PAL_NEW_TAPC, "TCL 2002MB 3"},
{ TUNER_LG_PAL_NEW_TAPC, "TCL 2002MI 3"},
Expand Down
14 changes: 14 additions & 0 deletions trunk/drivers/media/video/usbvideo/quickcam_messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,27 @@ struct rgb {
};

struct bayL0 {
#ifdef __BIG_ENDIAN
u8 r;
u8 g;
#elif __LITTLE_ENDIAN
u8 g;
u8 r;
#else
#error not byte order defined
#endif
};

struct bayL1 {
#ifdef __BIG_ENDIAN
u8 g;
u8 b;
#elif __LITTLE_ENDIAN
u8 b;
u8 g;
#else
#error not byte order defined
#endif
};

struct cam_size {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/media/video/usbvision/usbvision-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
int noblock = file->f_flags & O_NONBLOCK;
unsigned long lock_flags;

int frmx = -1;
int ret,i;
struct usbvision_frame *frame;

Expand Down Expand Up @@ -1154,7 +1155,7 @@ static ssize_t usbvision_v4l2_read(struct file *file, char *buf,
frame->bytes_read = 0;

/* Mark it as available to be used again. */
frame->grabstate = FrameState_Unused;
usbvision->frame[frmx].grabstate = FrameState_Unused;
/* } */

return count;
Expand Down
9 changes: 1 addition & 8 deletions trunk/drivers/media/video/v4l2-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,8 @@ MODULE_LICENSE("GPL");
char *v4l2_norm_to_name(v4l2_std_id id)
{
char *name;
u32 myid = id;

/* HACK: ppc32 architecture doesn't have __ucmpdi2 function to handle
64 bit comparations. So, on that architecture, with some gcc variants,
compilation fails. Currently, the max value is 30bit wide.
*/
BUG_ON(myid != id);

switch (myid) {
switch (id) {
case V4L2_STD_PAL:
name="PAL"; break;
case V4L2_STD_PAL_BG:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/video-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
vaddr,vma->vm_start,vma->vm_end);
if (vaddr > vma->vm_end)
return NOPAGE_SIGBUS;
page = alloc_page(GFP_USER | __GFP_DMA32);
page = alloc_page(GFP_USER);
if (!page)
return NOPAGE_OOM;
clear_user_page(page_address(page), vaddr, page);
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,15 +270,10 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,
char *p,*s,*basep;
struct page *pg;
u8 chr,r,g,b,color;
unsigned long flags;
spinlock_t spinlock;

spin_lock_init(&spinlock);

/* Get first addr pointed to pixel position */
oldpg=get_addr_pos(pos,pages,to_addr);
pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT);
spin_lock_irqsave(&spinlock,flags);
basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset;

/* We will just duplicate the second pixel at the packet */
Expand Down Expand Up @@ -381,8 +376,6 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax,

end:
kunmap_atomic(basep, KM_BOUNCE_READ);
spin_unlock_irqrestore(&spinlock,flags);

}
static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf)
{
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/mmc/imxmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd,
case MMC_RSP_R3: /* short */
cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R3;
break;
case MMC_RSP_R6: /* short CRC */
cmdat |= CMD_DAT_CONT_RESPONSE_FORMAT_R6;
break;
default:
break;
}
Expand Down
15 changes: 6 additions & 9 deletions trunk/drivers/mmc/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@


#define DRIVER_NAME "mmci-omap"
#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))

/* Specifies how often in millisecs to poll for card status changes
* when the cover switch is open */
Expand Down Expand Up @@ -203,22 +204,18 @@ mmc_omap_start_command(struct mmc_omap_host *host, struct mmc_command *cmd)
cmdtype = 0;

/* Our hardware needs to know exact type */
switch (mmc_resp_type(cmd)) {
case MMC_RSP_NONE:
break;
case MMC_RSP_R1:
case MMC_RSP_R1B:
/* resp 1, 1b, 6, 7 */
switch (RSP_TYPE(mmc_resp_type(cmd))) {
case RSP_TYPE(MMC_RSP_R1):
/* resp 1, resp 1b */
resptype = 1;
break;
case MMC_RSP_R2:
case RSP_TYPE(MMC_RSP_R2):
resptype = 2;
break;
case MMC_RSP_R3:
case RSP_TYPE(MMC_RSP_R3):
resptype = 3;
break;
default:
dev_err(mmc_dev(host->mmc), "Invalid response type: %04x\n", mmc_resp_type(cmd));
break;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd,

#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE))
switch (RSP_TYPE(mmc_resp_type(cmd))) {
case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6, r7 */
case RSP_TYPE(MMC_RSP_R1): /* r1, r1b, r6 */
cmdat |= CMDAT_RESP_SHORT;
break;
case RSP_TYPE(MMC_RSP_R3):
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/mmc/tifm_sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ static unsigned int tifm_sd_op_flags(struct mmc_command *cmd)
case MMC_RSP_R3:
rc |= TIFM_MMCSD_RSP_R3;
break;
case MMC_RSP_R6:
rc |= TIFM_MMCSD_RSP_R6;
break;
default:
BUG();
}
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/ntfs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ ToDo/Notes:
happen is unclear however so it is worth waiting until someone hits
the problem.

2.1.28 - Fix a deadlock.

- Fix deadlock in fs/ntfs/inode.c::ntfs_put_inode(). Thanks to Sergey
Vlasov for the report and detailed analysis of the deadlock. The fix
involved getting rid of ntfs_put_inode() altogether and hence NTFS no
longer has a ->put_inode super operation.

2.1.27 - Various bug fixes and cleanups.

- Fix two compiler warnings on Alpha. Thanks to Andrew Morton for
Expand Down
45 changes: 27 additions & 18 deletions trunk/fs/ntfs/dir.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project.
*
* Copyright (c) 2001-2005 Anton Altaparmakov
* Copyright (c) 2001-2007 Anton Altaparmakov
* Copyright (c) 2002 Richard Russon
*
* This program/include file is free software; you can redistribute it and/or
Expand Down Expand Up @@ -1249,24 +1249,20 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
/* Get the offset into the index allocation attribute. */
ia_pos = (s64)fpos - vol->mft_record_size;
ia_mapping = vdir->i_mapping;
bmp_vi = ndir->itype.index.bmp_ino;
if (unlikely(!bmp_vi)) {
ntfs_debug("Inode 0x%lx, regetting index bitmap.", vdir->i_ino);
bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
if (IS_ERR(bmp_vi)) {
ntfs_error(sb, "Failed to get bitmap attribute.");
err = PTR_ERR(bmp_vi);
goto err_out;
}
ndir->itype.index.bmp_ino = bmp_vi;
ntfs_debug("Inode 0x%lx, getting index bitmap.", vdir->i_ino);
bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
if (IS_ERR(bmp_vi)) {
ntfs_error(sb, "Failed to get bitmap attribute.");
err = PTR_ERR(bmp_vi);
goto err_out;
}
bmp_mapping = bmp_vi->i_mapping;
/* Get the starting bitmap bit position and sanity check it. */
bmp_pos = ia_pos >> ndir->itype.index.block_size_bits;
if (unlikely(bmp_pos >> 3 >= i_size_read(bmp_vi))) {
ntfs_error(sb, "Current index allocation position exceeds "
"index bitmap size.");
goto err_out;
goto iput_err_out;
}
/* Get the starting bit position in the current bitmap page. */
cur_bmp_pos = bmp_pos & ((PAGE_CACHE_SIZE * 8) - 1);
Expand All @@ -1282,7 +1278,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
ntfs_error(sb, "Reading index bitmap failed.");
err = PTR_ERR(bmp_page);
bmp_page = NULL;
goto err_out;
goto iput_err_out;
}
bmp = (u8*)page_address(bmp_page);
/* Find next index block in use. */
Expand Down Expand Up @@ -1429,6 +1425,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
/* @ia_page is already unlocked in this case. */
ntfs_unmap_page(ia_page);
ntfs_unmap_page(bmp_page);
iput(bmp_vi);
goto abort;
}
}
Expand All @@ -1439,6 +1436,7 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
ntfs_unmap_page(ia_page);
}
ntfs_unmap_page(bmp_page);
iput(bmp_vi);
EOD:
/* We are finished, set fpos to EOD. */
fpos = i_size + vol->mft_record_size;
Expand All @@ -1455,8 +1453,11 @@ static int ntfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
filp->f_pos = fpos;
return 0;
err_out:
if (bmp_page)
if (bmp_page) {
ntfs_unmap_page(bmp_page);
iput_err_out:
iput(bmp_vi);
}
if (ia_page) {
unlock_page(ia_page);
ntfs_unmap_page(ia_page);
Expand Down Expand Up @@ -1529,14 +1530,22 @@ static int ntfs_dir_open(struct inode *vi, struct file *filp)
static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry,
int datasync)
{
struct inode *vi = dentry->d_inode;
ntfs_inode *ni = NTFS_I(vi);
struct inode *bmp_vi, *vi = dentry->d_inode;
int err, ret;
ntfs_attr na;

ntfs_debug("Entering for inode 0x%lx.", vi->i_ino);
BUG_ON(!S_ISDIR(vi->i_mode));
if (NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino)
write_inode_now(ni->itype.index.bmp_ino, !datasync);
/* If the bitmap attribute inode is in memory sync it, too. */
na.mft_no = vi->i_ino;
na.type = AT_BITMAP;
na.name = I30;
na.name_len = 4;
bmp_vi = ilookup5(vi->i_sb, vi->i_ino, (test_t)ntfs_test_inode, &na);
if (bmp_vi) {
write_inode_now(bmp_vi, !datasync);
iput(bmp_vi);
}
ret = ntfs_write_inode(vi, 1);
write_inode_now(vi, !datasync);
err = sync_blockdev(vi->i_sb->s_bdev);
Expand Down
Loading

0 comments on commit 5c5efb8

Please sign in to comment.