lkml.org 
[lkml]   [2002]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] 2.5.31 small bug fix for blkdev_reread_part()
Date
Hi,

Here is a trivial bug fix for blkdev_reread_part() in 2.5.31.
Without this fix, "fdisk" hangs with following messages:

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16:
Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.


Please apply.


Thanks,
Badari

--- linux-2.5.31/fs/block_dev.c Tue Aug 13 13:25:37 2002
+++ linux-2.5.31.new/fs/block_dev.c Tue Aug 13 13:25:48 2002
@@ -797,7 +797,7 @@
part = disk->part + minor(dev) - disk->first_minor;
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
- if (down_trylock(&bdev->bd_sem));
+ if (down_trylock(&bdev->bd_sem))
return -EBUSY;
if (bdev->bd_part_count) {
up(&bdev->bd_sem);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.018 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site