lkml.org 
[lkml]   [2015]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V3] mmc: block: Add new ioctl to send multi commands
From
Date

On 17/09/15 07:59, Ulf Hansson wrote:
> [...]
>
>>>> + /*
>>>> + * The caller must have CAP_SYS_RAWIO, and must be calling this on the
>>>> + * whole block device, not on a partition. This prevents overspray
>>>> + * between sibling partitions.
>>>> + */
>>>> + if ((!capable(CAP_SYS_RAWIO)) || (bdev != bdev->bd_contains))
>>>> + return -EPERM;
>>>
>>> This check is common for multi and non-multi. Please move it to the
>>> mmc_blk_ioctl() to avoid some code duplication.
>>
>> Yes that's true. I can move but it means also passing bdev to
>> __mmc_blk_ioctl_cmd() as another argument. It is not a big deal, but it
>> was more convenient to test here. If your preference is to consolidate
>> the tests to one place then I will move this test.
>
> I was suggesting to move it to mmc_blk_ioctl() and not to
> __mmc_blk_ioctl_cmd(). That shouldn't cause any changes to any
> function-definitions, right!?

Sorry, completely mis-read. Yes that makes sense, will update.

Cheers
Jon


\
 
 \ /
  Last update: 2015-09-18 12:41    [W:0.068 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site