diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 23:05:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 23:05:37 -0400 |
commit | 4b4f1d017815f96737ca4a62f90e5a1f0b9f02d6 (patch) | |
tree | c95ae92ec01cabf6c2a40d31a31da6a4d9256816 /drivers | |
parent | 875287caa067492779670f5fb3b98ec8dcfe2cb0 (diff) | |
parent | aa7dfb8954ccf49e026ba13d12991a4eb7defb96 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (87 commits)
nilfs2: get rid of bd_mount_sem use from nilfs
nilfs2: correct exclusion control in nilfs_remount function
nilfs2: simplify remaining sget() use
nilfs2: get rid of sget use for checking if current mount is present
nilfs2: get rid of sget use for acquiring nilfs object
nilfs2: remove meaningless EBUSY case from nilfs_get_sb function
remove the call to ->write_super in __sync_filesystem
nilfs2: call nilfs2_write_super from nilfs2_sync_fs
jffs2: call jffs2_write_super from jffs2_sync_fs
ufs: add ->sync_fs
sysv: add ->sync_fs
hfsplus: add ->sync_fs
hfs: add ->sync_fs
fat: add ->sync_fs
ext2: add ->sync_fs
exofs: add ->sync_fs
bfs: add ->sync_fs
affs: add ->sync_fs
sanitize ->fsync() for affs
repair bfs_write_inode(), switch bfs to simple_fsync()
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ieee1394/dv1394.c | 5 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.h | 6 | ||||
-rw-r--r-- | drivers/usb/core/inode.c | 5 |
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 823a6297a1af..2cd00b5b45b4 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c | |||
@@ -1789,12 +1789,13 @@ static int dv1394_open(struct inode *inode, struct file *file) | |||
1789 | } else { | 1789 | } else { |
1790 | /* look up the card by ID */ | 1790 | /* look up the card by ID */ |
1791 | unsigned long flags; | 1791 | unsigned long flags; |
1792 | int idx = ieee1394_file_to_instance(file); | ||
1792 | 1793 | ||
1793 | spin_lock_irqsave(&dv1394_cards_lock, flags); | 1794 | spin_lock_irqsave(&dv1394_cards_lock, flags); |
1794 | if (!list_empty(&dv1394_cards)) { | 1795 | if (!list_empty(&dv1394_cards)) { |
1795 | struct video_card *p; | 1796 | struct video_card *p; |
1796 | list_for_each_entry(p, &dv1394_cards, list) { | 1797 | list_for_each_entry(p, &dv1394_cards, list) { |
1797 | if ((p->id) == ieee1394_file_to_instance(file)) { | 1798 | if ((p->id) == idx) { |
1798 | video = p; | 1799 | video = p; |
1799 | break; | 1800 | break; |
1800 | } | 1801 | } |
@@ -1803,7 +1804,7 @@ static int dv1394_open(struct inode *inode, struct file *file) | |||
1803 | spin_unlock_irqrestore(&dv1394_cards_lock, flags); | 1804 | spin_unlock_irqrestore(&dv1394_cards_lock, flags); |
1804 | 1805 | ||
1805 | if (!video) { | 1806 | if (!video) { |
1806 | debug_printk("dv1394: OHCI card %d not found", ieee1394_file_to_instance(file)); | 1807 | debug_printk("dv1394: OHCI card %d not found", idx); |
1807 | return -ENODEV; | 1808 | return -ENODEV; |
1808 | } | 1809 | } |
1809 | 1810 | ||
diff --git a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h index 21d50f73a210..28b9f58bafd2 100644 --- a/drivers/ieee1394/ieee1394_core.h +++ b/drivers/ieee1394/ieee1394_core.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/list.h> | 6 | #include <linux/list.h> |
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/cdev.h> | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
10 | #include "hosts.h" | 11 | #include "hosts.h" |
@@ -155,7 +156,10 @@ void hpsb_packet_received(struct hpsb_host *host, quadlet_t *data, size_t size, | |||
155 | */ | 156 | */ |
156 | static inline unsigned char ieee1394_file_to_instance(struct file *file) | 157 | static inline unsigned char ieee1394_file_to_instance(struct file *file) |
157 | { | 158 | { |
158 | return file->f_path.dentry->d_inode->i_cindex; | 159 | int idx = cdev_index(file->f_path.dentry->d_inode); |
160 | if (idx < 0) | ||
161 | idx = 0; | ||
162 | return idx; | ||
159 | } | 163 | } |
160 | 164 | ||
161 | extern int hpsb_disable_irm; | 165 | extern int hpsb_disable_irm; |
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c index dff5760a37f6..ffe75e83787c 100644 --- a/drivers/usb/core/inode.c +++ b/drivers/usb/core/inode.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/parser.h> | 39 | #include <linux/parser.h> |
40 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
42 | #include <linux/smp_lock.h> | ||
42 | #include <asm/byteorder.h> | 43 | #include <asm/byteorder.h> |
43 | #include "usb.h" | 44 | #include "usb.h" |
44 | #include "hcd.h" | 45 | #include "hcd.h" |
@@ -265,9 +266,13 @@ static int remount(struct super_block *sb, int *flags, char *data) | |||
265 | return -EINVAL; | 266 | return -EINVAL; |
266 | } | 267 | } |
267 | 268 | ||
269 | lock_kernel(); | ||
270 | |||
268 | if (usbfs_mount && usbfs_mount->mnt_sb) | 271 | if (usbfs_mount && usbfs_mount->mnt_sb) |
269 | update_sb(usbfs_mount->mnt_sb); | 272 | update_sb(usbfs_mount->mnt_sb); |
270 | 273 | ||
274 | unlock_kernel(); | ||
275 | |||
271 | return 0; | 276 | return 0; |
272 | } | 277 | } |
273 | 278 | ||