Commit cfb315eb authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix a couple of issues on the error path when dealing with external

devices (log/realtime).  path_init was missing the LOOKUP_POSITIVE
flag, so it would fail to tell us if the file doesn't exist, there
was a spot where we were returning the wrong signedness for the code,
and when mount is failing, we can call into xfs_blkdev_put with a
NULL pointer depending on which devices were initialised and which
weren't.

SGI Modid: 2.5.x-xfs:slinx:131469a
parent 9043ec66
...@@ -477,9 +477,8 @@ xfs_blkdev_get( ...@@ -477,9 +477,8 @@ xfs_blkdev_get(
error = path_lookup(name, LOOKUP_FOLLOW, &nd); error = path_lookup(name, LOOKUP_FOLLOW, &nd);
if (error) { if (error) {
printk("XFS: Invalid device [%s], error=%d\n", printk("XFS: Invalid device [%s], error=%d\n", name, error);
name, error); return -error;
return error;
} }
/* I think we actually want bd_acquire here.. --hch */ /* I think we actually want bd_acquire here.. --hch */
...@@ -498,6 +497,7 @@ void ...@@ -498,6 +497,7 @@ void
xfs_blkdev_put( xfs_blkdev_put(
struct block_device *bdev) struct block_device *bdev)
{ {
if (bdev)
blkdev_put(bdev, BDEV_FS); blkdev_put(bdev, BDEV_FS);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment