[PATCH 2/2] mmc: Check to disable IOCTL when card is mounted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shashidhar Hiremath <shashidharh@xxxxxxxxxxxxxxx>

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 <shashidharh@xxxxxxxxxxxxxxx>
---
 drivers/mmc/card/block.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index e680929..e513d20 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -387,8 +387,10 @@ 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 */
+	/*
+	 * Disallow the IOCTL run if card is already mounted or device is
+	 * opened elsewhere
+	 */
 	if (md->usage > 3) {
 		err = -EINVAL;
 		goto cmd_done;
-- 
1.7.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux