]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-fuse: fix unlink
authorShawn Edwards <lesser.evil@gmail.com>
Tue, 29 Apr 2014 00:05:36 +0000 (17:05 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 29 Apr 2014 00:08:12 +0000 (17:08 -0700)
The path contains a leading / that needs to be ignored.

Fixes: #8197
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/rbd_fuse/rbd-fuse.c

index 085a38500cda04c413cbe47bdd7e08efaf418a4b..1f3a21795d44522affad4bc029dd643b3fed1b76 100644 (file)
@@ -513,7 +513,7 @@ rbdfs_utime(const char *path, struct utimbuf *utime)
 int
 rbdfs_unlink(const char *path)
 {
-       int fd = find_openrbd(path);
+       int fd = find_openrbd(path+1);
        if (fd != -1) {
                struct rbd_openimage *rbd = &opentbl[fd];
                rbd_close(rbd->image);