remove a dead function
[sahlberg/remote-cache.git] / migrate / remote-cache.c
index da130f1ab7dfe4773e4f4755ac59ae1681941780..b5086b64f0b67573d901edf4e0307bafaa6ab1e0 100644 (file)
@@ -2935,44 +2935,6 @@ finished:
 }
 
 
-#if 0
-static int remote_cache_lock(const char *path, struct fuse_file_info *ffi, int cmd, struct flock *fl)
-{
-return 0;
-       int fd;
-       int ret;
-
-       if (!read_write) {
-               return -EROFS;
-       }
-
-       DEBUG(DEBUG_DEBUG, ("LOCK %s cmd:%s(%d)\n", path, cmd==F_GETLK?"F_GETLK":cmd==F_SETLKW?"F_SETLKW":cmd==F_SETLK?"F_SETLK":"unknown", cmd));
-
-       ret = switch_to_real_user();
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR, (__location__ " SETEUID failed\n"));
-               goto finished;
-       }
-
-       fd = *((int *)(&ffi->fh));
-       if (fd == -1) {
-               DEBUG(DEBUG_ERR,(__location__ " ERROR file to lock is not open %s\n", path));
-               ret = -errno;
-               goto finished;
-       }
-
-       ret = fcntl(fd, cmd, fl);
-       if (ret == -1) {
-               DEBUG(DEBUG_ERR,(__location__ " FCNTL lock failed with errno:%d for fd:%d for file %s\n", errno, fd, path));
-               ret = -errno;
-               goto finished;
-       }
-
-finished:
-       switch_back_to_root();
-       return ret;
-}
-#endif
 
 
 static int remote_cache_open(const char *path, struct fuse_file_info *ffi)