On Mon, Feb 22 2016, Asai Thambi SP wrote: > > To avoid erasing a device with a mounted filesystem, try to get exclusive > access to the blkdev object corresponding to the device.
I don't think this needs to be in the kernel, why not just check from the official format tool if the device is mounted or not? -- Jens Axboe

