Sharing Voilation in getting fileObject

Hi all,
I am getting STATUS_SHARING_VOILATION while using IoGetDeviceObjectPointer for getting fileObject, then I use it to get deviceObject. It is a partition for which I want to get the deviceObject.

Thanks in Advance.