Gitweb:
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8270bec40075eec9df8778c1d5da36ef0e535176
Commit: 8270bec40075eec9df8778c1d5da36ef0e535176
Parent: b377fd3982ad957c796758a90e2988401a884241
Author: Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 16 03:02:22 2007 +0900
Committer: Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu Aug 23 05:23:14 2007 -0400
libata: fix n_sectors failure handling during revalidation
If revalidation fails because device has different n_sectors after
configuration the original n_sectors should be restored before failing
revalidation. Without this fix, n_sectors difference will incorrectly
and silently pass revalidation when revalidation is retried.
Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
Acked-by: Alan Cox <[EMAIL PROTECTED]>
Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
drivers/ata/libata-core.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 99d4fbf..9bfe329 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3705,6 +3705,10 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned
int readid_flags)
"%llu != %llu\n",
(unsigned long long)n_sectors,
(unsigned long long)dev->n_sectors);
+
+ /* restore original n_sectors */
+ dev->n_sectors = n_sectors;
+
rc = -ENODEV;
goto fail;
}
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html