infra: remove old method

This commit is contained in:
Thomas Schoebel-Theuer 2020-10-19 16:15:15 +02:00 committed by Thomas Schoebel-Theuer
parent dd428841d0
commit c77d656c01

View File

@ -1529,10 +1529,6 @@ const struct skip_info skips[] = {
{ NULL, 0 }
};
#define MARS_BACKUP_STR "backup"
static const int backup_strlen = strlen(MARS_BACKUP_STR);
/* Caution: this is called as a callback from iterate_dir() and friends.
* Don't deadlock by producing any filesystem output within this!
*/
@ -1562,7 +1558,6 @@ int mars_filler(void *__buf, const char *name, int namlen, loff_t offset,
int pathlen;
int class;
int serial = 0;
int backup_len;
#if 0
int i;
#endif
@ -1590,12 +1585,6 @@ int mars_filler(void *__buf, const char *name, int namlen, loff_t offset,
d_type != DT_LNK))
return 0;
backup_len = namlen;
if (backup_len > backup_strlen)
backup_len = backup_strlen;
if (strnstr(name, MARS_BACKUP_STR, backup_len))
return 0;
pathlen = strlen(cookie->path);
newpath = brick_string_alloc(pathlen + namlen + 2);
memcpy(newpath, cookie->path, pathlen);
@ -1894,8 +1883,6 @@ static int _mars_readdir(struct mars_cookie *cookie)
if (!strncmp(cookie->path, check->name, check->len))
goto done;
}
if (unlikely(strstr(cookie->path, MARS_BACKUP_STR)))
goto done;
/* Performance optimization.
* Skip readdir() when not activated and no device-$host exists