Skip to content

Commit

Permalink
dm ioctl: remove __dev_status from geometry and target message
Browse files Browse the repository at this point in the history
Remove useless __dev_status call while processing an ioctl that sets up
device geometry and target message.  The data is not returned to
userspace so there is no point collecting it and in the case of
target_message it is collected before processing the message so if it
did return it might be stale.

Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Peter Rajnoha authored and Alasdair G Kergon committed Aug 12, 2010
1 parent c241104 commit 6be5449
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,6 @@ static int dev_set_geometry(struct dm_ioctl *param, size_t param_size)
geometry.start = indata[3];

r = dm_set_geometry(md, &geometry);
if (!r)
r = __dev_status(md, param);

param->data_size = 0;

Expand Down Expand Up @@ -1333,10 +1331,6 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
if (!md)
return -ENXIO;

r = __dev_status(md, param);
if (r)
goto out;

if (tmsg < (struct dm_target_msg *) param->data ||
invalid_str(tmsg->message, (void *) param + param_size)) {
DMWARN("Invalid target message parameters.");
Expand Down

0 comments on commit 6be5449

Please sign in to comment.