On Wed, Dec 28, 2011 at 5:46 AM, Shashidhar hiremath
<[email protected]> wrote:
> From: Shashidhar Hiremath <[email protected]>
>
> The Patch adds a check to disable the IOCTL from running when the card is
> mounted
> or device is opened elsewhere.
>
> Signed-off-by: Shashidhar Hiremath <[email protected]>
> ---
> drivers/mmc/card/block.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 0cad48a..e680929 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -387,6 +387,12 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev,
> err = -EINVAL;
> goto cmd_done;
> }
> + /* Disallow the IOCTL run if card is already mounted or device is
> + * opened elsewhere */
Fix multi line comment
Can refer : Documentation/kernel-doc-nano-HOWTO.txt
> + if (md->usage > 3) {
> + err = -EINVAL;
> + goto cmd_done;
> + }
>
> card = md->queue.card;
> if (IS_ERR(card)) {
> --
> 1.7.6.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html