From: David Howells Date: Tue, 5 Dec 2006 17:01:28 +0000 (+0000) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 X-Git-Tag: v2.6.20-rc1~34^2~20^2~33^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9db73724453a9350e1c22dbe732d427e2939a5c9;p=linux-2.6-omap-h63xx.git Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/ata/libata-scsi.c include/linux/libata.h Futher merge of Linus's head and compilation fixups. Signed-Off-By: David Howells --- 9db73724453a9350e1c22dbe732d427e2939a5c9 diff --cc drivers/ata/libata-scsi.c index 4c32d93d44b,8eaace94d96..664e1377b54 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@@ -3203,19 -3086,30 +3087,31 @@@ static int ata_scsi_user_scan(struct Sc * LOCKING: * Kernel thread context (may sleep). */ -void ata_scsi_dev_rescan(void *data) +void ata_scsi_dev_rescan(struct work_struct *work) { - struct ata_port *ap = data; + struct ata_port *ap = + container_of(work, struct ata_port, scsi_rescan_task); - struct ata_device *dev; + unsigned long flags; unsigned int i; + spin_lock_irqsave(ap->lock, flags); + for (i = 0; i < ATA_MAX_DEVICES; i++) { - dev = &ap->device[i]; + struct ata_device *dev = &ap->device[i]; + struct scsi_device *sdev = dev->sdev; - if (ata_dev_enabled(dev) && dev->sdev) - scsi_rescan_device(&(dev->sdev->sdev_gendev)); + if (!ata_dev_enabled(dev) || !sdev) + continue; + if (scsi_device_get(sdev)) + continue; + + spin_unlock_irqrestore(ap->lock, flags); + scsi_rescan_device(&(sdev->sdev_gendev)); + scsi_device_put(sdev); + spin_lock_irqsave(ap->lock, flags); } + + spin_unlock_irqrestore(ap->lock, flags); } /** diff --cc fs/ocfs2/journal.h index 5be161a4ad9,d86cb960b7e..899112ad813 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h @@@ -133,46 -132,8 +132,8 @@@ static inline void ocfs2_inode_set_new( spin_unlock(&trans_inc_lock); } - extern kmem_cache_t *ocfs2_lock_cache; - - struct ocfs2_journal_lock { - struct inode *jl_inode; - struct list_head jl_lock_list; - }; - - struct ocfs2_journal_handle { - handle_t *k_handle; /* kernel handle. */ - struct ocfs2_journal *journal; - u32 flags; /* see flags below. */ - int max_buffs; /* Buffs reserved by this handle */ - - /* The following two fields are for ocfs2_handle_add_lock */ - int num_locks; - struct list_head locks; /* A bunch of locks to - * release on commit. This - * should be a list_head */ - - struct list_head inode_list; - }; - - #define OCFS2_HANDLE_STARTED 1 - /* should we sync-commit this handle? */ - #define OCFS2_HANDLE_SYNC 2 - static inline int ocfs2_handle_started(struct ocfs2_journal_handle *handle) - { - return handle->flags & OCFS2_HANDLE_STARTED; - } - - static inline void ocfs2_handle_set_sync(struct ocfs2_journal_handle *handle, int sync) - { - if (sync) - handle->flags |= OCFS2_HANDLE_SYNC; - else - handle->flags &= ~OCFS2_HANDLE_SYNC; - } - /* Exported only for the journal struct init code in super.c. Do not call. */ -void ocfs2_complete_recovery(void *data); +void ocfs2_complete_recovery(struct work_struct *work); /* * Journal Control: diff --cc include/linux/libata.h index b3f32eadbef,202283b5df9..ab275483032 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@@ -745,10 -753,9 +754,9 @@@ extern int ata_scsi_device_suspend(stru extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); extern void ata_host_resume(struct ata_host *host); extern int ata_ratelimit(void); - extern unsigned int ata_busy_sleep(struct ata_port *ap, - unsigned long timeout_pat, - unsigned long timeout); + extern int ata_busy_sleep(struct ata_port *ap, + unsigned long timeout_pat, unsigned long timeout); -extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), +extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data, unsigned long delay); extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, unsigned long interval_msec,