All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show
@ 2019-05-24  2:44 ` Marcos Paulo de Souza
  0 siblings, 0 replies; 4+ messages in thread
From: Marcos Paulo de Souza @ 2019-05-24  2:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: liu.song.a23, Marcos Paulo de Souza, Shaohua Li,
	open list:SOFTWARE RAID Multiple Disks SUPPORT

Commit c42d3240990814eec1e4b2b93fa0487fc4873aed
("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to
return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 45ffa23fa85d..0b391e7e063b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3363,7 +3363,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
 	if (!entry->show)
 		return -EIO;
 	if (!rdev->mddev)
-		return -EBUSY;
+		return -ENODEV;
 	return entry->show(rdev, page);
 }
 
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show
@ 2019-05-24  2:44 ` Marcos Paulo de Souza
  0 siblings, 0 replies; 4+ messages in thread
From: Marcos Paulo de Souza @ 2019-05-24  2:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: liu.song.a23, Marcos Paulo de Souza, Shaohua Li,
	open list:SOFTWARE RAID (Multiple Disks) SUPPORT

Commit c42d3240990814eec1e4b2b93fa0487fc4873aed
("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to
return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 drivers/md/md.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 45ffa23fa85d..0b391e7e063b 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3363,7 +3363,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
 	if (!entry->show)
 		return -EIO;
 	if (!rdev->mddev)
-		return -EBUSY;
+		return -ENODEV;
 	return entry->show(rdev, page);
 }
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show
  2019-05-24  2:44 ` Marcos Paulo de Souza
@ 2019-06-06 16:41   ` Song Liu
  -1 siblings, 0 replies; 4+ messages in thread
From: Song Liu @ 2019-06-06 16:41 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: open list, Shaohua Li, open list:SOFTWARE RAID (Multiple Disks) SUPPORT

On Thu, May 23, 2019 at 7:45 PM Marcos Paulo de Souza
<marcos.souza.org@gmail.com> wrote:
>
> Commit c42d3240990814eec1e4b2b93fa0487fc4873aed
> ("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to
> return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show.

nit: checkpatch.pl complains

WARNING: Possible unwrapped commit description (prefer a maximum 75
chars per line)
#84:
("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to

I fixed this in my tree, so no need to resend.

Thanks,
Song

>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> ---
>  drivers/md/md.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 45ffa23fa85d..0b391e7e063b 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -3363,7 +3363,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
>         if (!entry->show)
>                 return -EIO;
>         if (!rdev->mddev)
> -               return -EBUSY;
> +               return -ENODEV;
>         return entry->show(rdev, page);
>  }
>
> --
> 2.21.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show
@ 2019-06-06 16:41   ` Song Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Song Liu @ 2019-06-06 16:41 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: open list, Shaohua Li, open list:SOFTWARE RAID (Multiple Disks) SUPPORT

On Thu, May 23, 2019 at 7:45 PM Marcos Paulo de Souza
<marcos.souza.org@gmail.com> wrote:
>
> Commit c42d3240990814eec1e4b2b93fa0487fc4873aed
> ("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to
> return -ENODEV when rdev->mddev is NULL, now do the same to rdev_attr_show.

nit: checkpatch.pl complains

WARNING: Possible unwrapped commit description (prefer a maximum 75
chars per line)
#84:
("md: return -ENODEV if rdev has no mddev assigned") changed rdev_attr_store to

I fixed this in my tree, so no need to resend.

Thanks,
Song

>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
> ---
>  drivers/md/md.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 45ffa23fa85d..0b391e7e063b 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -3363,7 +3363,7 @@ rdev_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
>         if (!entry->show)
>                 return -EIO;
>         if (!rdev->mddev)
> -               return -EBUSY;
> +               return -ENODEV;
>         return entry->show(rdev, page);
>  }
>
> --
> 2.21.0
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-06 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24  2:44 [PATCH] md: md.c: Return -ENODEV when mddev is NULL in rdev_attr_show Marcos Paulo de Souza
2019-05-24  2:44 ` Marcos Paulo de Souza
2019-06-06 16:41 ` Song Liu
2019-06-06 16:41   ` Song Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.