diff --git a/model/EmulatedVolume.cpp b/model/EmulatedVolume.cpp
index ca314ef..022ff42 100644
--- a/model/EmulatedVolume.cpp
+++ b/model/EmulatedVolume.cpp
@@ -88,13 +88,13 @@
 
     if (isFuse) {
         LOG(INFO) << "Mounting emulated fuse volume";
-        int fd = -1;
+        android::base::unique_fd fd;
         int result = MountUserFuse(getMountUserId(), label, &fd);
         if (result != 0) {
             PLOG(ERROR) << "Failed to mount emulated fuse volume";
             return -result;
         }
-        setDeviceFd(fd);
+        setFuseFd(std::move(fd));
         return OK;
     }
 
@@ -170,7 +170,7 @@
         }
 
         rmdir(path.c_str());
-        setDeviceFd(-1);
+        setFuseFd(android::base::unique_fd());
         return OK;
     }
 
diff --git a/model/PublicVolume.cpp b/model/PublicVolume.cpp
index 2c0b4cc..ebcb91a 100644
--- a/model/PublicVolume.cpp
+++ b/model/PublicVolume.cpp
@@ -173,13 +173,13 @@
 
     if (isFuse) {
         LOG(INFO) << "Mounting public fuse volume";
-        int fd = -1;
+        android::base::unique_fd fd;
         int result = MountUserFuse(getMountUserId(), stableName, &fd);
         if (result != 0) {
             LOG(ERROR) << "Failed to mount public fuse volume";
             return -result;
         }
-        setDeviceFd(fd);
+        setFuseFd(std::move(fd));
         return OK;
     }
 
@@ -265,7 +265,7 @@
         }
 
         rmdir(path.c_str());
-        setDeviceFd(-1);
+        setFuseFd(android::base::unique_fd());
         return OK;
     }
 
diff --git a/model/VolumeBase.cpp b/model/VolumeBase.cpp
index fa007ad..d6e4288 100644
--- a/model/VolumeBase.cpp
+++ b/model/VolumeBase.cpp
@@ -143,13 +143,13 @@
     return OK;
 }
 
-status_t VolumeBase::setDeviceFd(int deviceFd) {
-    if ((mState != State::kChecking)) {
-        LOG(WARNING) << getId() << " device fd change requires state checking";
+status_t VolumeBase::setFuseFd(android::base::unique_fd fuseFd) {
+    if ((mState != State::kChecking) && (mState != State::kEjecting)) {
+        LOG(WARNING) << getId() << " fuse fd change requires state checking or ejecting";
         return -EBUSY;
     }
 
-    mDeviceFd.reset(deviceFd);
+    mFuseFd.reset(std::move(fuseFd.get()));
     return OK;
 }
 
diff --git a/model/VolumeBase.h b/model/VolumeBase.h
index fa9eee4..6afb88e 100644
--- a/model/VolumeBase.h
+++ b/model/VolumeBase.h
@@ -87,7 +87,7 @@
     State getState() const { return mState; }
     const std::string& getPath() const { return mPath; }
     const std::string& getInternalPath() const { return mInternalPath; }
-    int getDeviceFd() const { return dup(mDeviceFd.get()); }
+    const android::base::unique_fd& getFuseFd() const { return mFuseFd; }
 
     status_t setDiskId(const std::string& diskId);
     status_t setPartGuid(const std::string& partGuid);
@@ -122,7 +122,7 @@
     status_t setId(const std::string& id);
     status_t setPath(const std::string& path);
     status_t setInternalPath(const std::string& internalPath);
-    status_t setDeviceFd(int deviceFd);
+    status_t setFuseFd(android::base::unique_fd fuseFd);
 
     android::sp<android::os::IVoldListener> getListener() const;
 
@@ -150,7 +150,7 @@
     /* Flag indicating that volume should emit no events */
     bool mSilent;
     /* The filedescriptor for the fuse device, if the volume uses fuse, or -1 otherwise */
-    android::base::unique_fd mDeviceFd;
+    android::base::unique_fd mFuseFd;
 
     /* Volumes stacked on top of this volume */
     std::list<std::shared_ptr<VolumeBase>> mVolumes;
