diff options
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/block/loop.c | 17 | ||||
-rw-r--r-- | include/linux/compat.h | 6 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 2 | ||||
-rw-r--r-- | kernel/timer.c | 2 |
5 files changed, 17 insertions, 12 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 68a56add73e..21f3fff5432 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1712,8 +1712,6 @@ L: Linux-Kernel@vger.kernel.org S: Maintained i386 SETUP CODE / CPU ERRATA WORKAROUNDS -P: Dave Jones -M: davej@codemonkey.org.uk P: H. Peter Anvin M: hpa@zytor.com S: Maintained diff --git a/drivers/block/loop.c b/drivers/block/loop.c index e2fc4b6734c..5526eadb659 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1399,6 +1399,11 @@ static struct loop_device *loop_init_one(int i) struct loop_device *lo; struct gendisk *disk; + list_for_each_entry(lo, &loop_devices, lo_list) { + if (lo->lo_number == i) + return lo; + } + lo = kzalloc(sizeof(*lo), GFP_KERNEL); if (!lo) goto out; @@ -1443,17 +1448,13 @@ static void loop_del_one(struct loop_device *lo) kfree(lo); } -static int loop_lock(dev_t dev, void *data) -{ - mutex_lock(&loop_devices_mutex); - return 0; -} - static struct kobject *loop_probe(dev_t dev, int *part, void *data) { - struct loop_device *lo = loop_init_one(dev & MINORMASK); + struct loop_device *lo; struct kobject *kobj; + mutex_lock(&loop_devices_mutex); + lo = loop_init_one(dev & MINORMASK); kobj = lo ? get_disk(lo->lo_disk) : ERR_PTR(-ENOMEM); mutex_unlock(&loop_devices_mutex); @@ -1466,7 +1467,7 @@ static int __init loop_init(void) if (register_blkdev(LOOP_MAJOR, "loop")) return -EIO; blk_register_region(MKDEV(LOOP_MAJOR, 0), 1UL << MINORBITS, - THIS_MODULE, loop_probe, loop_lock, NULL); + THIS_MODULE, loop_probe, NULL, NULL); if (max_loop) { printk(KERN_INFO "loop: the max_loop option is obsolete " diff --git a/include/linux/compat.h b/include/linux/compat.h index 636502c0273..0e69d2cf14a 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -261,5 +261,11 @@ asmlinkage long compat_sys_epoll_pwait(int epfd, asmlinkage long compat_sys_utimensat(unsigned int dfd, char __user *filename, struct compat_timespec __user *t, int flags); +asmlinkage long compat_sys_signalfd(int ufd, + const compat_sigset_t __user *sigmask, + compat_size_t sigsetsize); +asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags, + const struct compat_itimerspec __user *utmr); + #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index f9217bf644f..3d1042f82a6 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -273,6 +273,8 @@ static int timekeeping_resume(struct sys_device *dev) unsigned long flags; unsigned long now = read_persistent_clock(); + clocksource_resume(); + write_seqlock_irqsave(&xtime_lock, flags); if (now && (now > timekeeping_suspend_time)) { diff --git a/kernel/timer.c b/kernel/timer.c index a6c580ac084..5ec5490f8d8 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1499,8 +1499,6 @@ unregister_time_interpolator(struct time_interpolator *ti) prev = &curr->next; } - clocksource_resume(); - write_seqlock_irqsave(&xtime_lock, flags); if (ti == time_interpolator) { /* we lost the best time-interpolator: */ |