Skip to contentSkip to conversation

patch ide-proc-remove-rwsem.patch added to gregkh-2.6 tree

PATCH [email protected] 1 participant 1 message Apr 9, 2007 libata

lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Subject: IDE: remove rwsem use from ide-proc core

to my gregkh-2.6 tree. Its filename is

ide-proc-remove-rwsem.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/

Quoted 1 line

From foo@baz Tue Apr 9 12:12:43 2002

Date: Mon, 9 Apr 2007 11:52:31 -0400 (EDT)
To: Greg KH <[email protected]>
From: Greg Kroah-Hartman <[email protected]>
Subject: IDE: remove rwsem use from ide-proc core

The subsystem rwsem is not used by the driver core at all, so the use of it in the ide-proc code of it doesn't make any sense. Perhaps a local lock might be needed, but I do not really think so.

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc linux ide <[email protected]>
---
 drivers/ide/ide-proc.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/ide/ide-proc.c +0 -4
@@ -310,14 +310,12 @@ static int proc_ide_read_driver
 	ide_driver_t	*ide_drv;
 	int		len;
 
-	down_read(&dev->bus->subsys.rwsem);
 	if (dev->driver) {
 		ide_drv = container_of(dev->driver, ide_driver_t, gen_driver);
 		len = sprintf(page, "%s version %s\n",
 				dev->driver->name, ide_drv->version);
 	} else
 		len = sprintf(page, "ide-default version 0.9.newide\n");
-	up_read(&dev->bus->subsys.rwsem);
 	PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
 }
 
@@ -327,7 +325,6 @@ static int ide_replace_subdriver(ide_dri
 	int ret = 1;
 	int err;
 
-	down_write(&dev->bus->subsys.rwsem);
 	device_release_driver(dev);
 	/* FIXME: device can still be in use by previous driver */
 	strlcpy(drive->driver_req, driver, sizeof(drive->driver_req));
@@ -345,7 +342,6 @@ static int ide_replace_subdriver(ide_dri
 	}
 	if (dev->driver && !strcmp(dev->driver->name, driver))
 		ret = 0;
-	up_write(&dev->bus->subsys.rwsem);
 
 	return ret;
 }

Patches currently in gregkh-2.6 which might be from [email protected] are