__func__);
mutex_lock(&devreq_mutex);
- orangefs_bufmap_finalize();
+ if (get_bufmap_init())
+ orangefs_bufmap_finalize();
open_access_count--;
(struct ORANGEFS_dev_map_desc __user *)
arg,
sizeof(struct ORANGEFS_dev_map_desc));
- return ret ? -EIO : orangefs_bufmap_initialize(&user_desc);
+ if (get_bufmap_init()) {
+ return -EINVAL;
+ } else {
+ return ret ?
+ -EIO :
+ orangefs_bufmap_initialize(&user_desc);
+ }
case ORANGEFS_DEV_REMOUNT_ALL:
gossip_debug(GOSSIP_DEV_DEBUG,
"%s: got ORANGEFS_DEV_REMOUNT_ALL\n",