Mohanlal Wrote: > #./a.out > #./a.out > Open failed > #./a.out > Open failed You can remove the following statement from the application and compile the application then run the ./a.out. It should not fail. --- ioctl(fd,REMOVE_MOUNTED_DISK); Bye the bye, what is your kernel version? > As I said, I didn't mount the device. Could you tell me exact steps you > followed to make fs and mount? Here are the steps to reproduce the problem at our end. 1) Build the sbd.ko file using the Makefile (make) 2) Load (insert) the module into the kernel space (insmod sbd.ko) 3) wait a few milli seconds to create the device node and format the device (mke2fs /dev/sbd0) 4) mount the device (mount /dev/sbd0 /mnt) 5) copy some files into the mount point (cp *.c /mnt) 6) un mount the device (umount /mnt OR umount /dev/sbd0) 7) then again, mount the device (mount /dev/sbd0 /mnt) 8) remove the mounted device (compile the app.c file [cc app.c] then run the ./a.out which will remove the mounted device) You can easily understand by seeing the code. 9) cd /mnt 10) run ls (which shows the errors messages - see attachment mes_log file) 11) run again ls - console crash Thanks and Regards, Srinivas G -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/