dma-buf: Move code out of mutex-protected section in dma_buf_attach()

Some fields can be set without mutex protection. Initialize them before
locking the mutex.

Change-Id: I3510e3d01ed1b4418749f43a7eb22f5eeeee52f2
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>