This commit is contained in:
benrubson 2017-11-02 10:16:51 +01:00
parent e0b2ad8f66
commit a54331c568

View File

@ -784,8 +784,8 @@ static void *idleMonitor(void *_arg) {
RLOG(WARNING) << "Filesystem inactive, but " << openCount RLOG(WARNING) << "Filesystem inactive, but " << openCount
<< " files opened: " << arg->opts->mountPoint; << " files opened: " << arg->opts->mountPoint;
} else { } else {
/* try to lock the mount point to give an oportunity to handle races /* try to lock the mount point to give an oportunity to handle races
with an automated tool or script using --idle. */ with an automated tool or script using --idle. */
int fdlock = open(arg->opts->mountPoint.c_str(),O_RDONLY); int fdlock = open(arg->opts->mountPoint.c_str(),O_RDONLY);
if (flock(fdlock, LOCK_EX|LOCK_NB) == -1) { if (flock(fdlock, LOCK_EX|LOCK_NB) == -1) {
RLOG(WARNING) << "Filesystem inactive, but " RLOG(WARNING) << "Filesystem inactive, but "