Loading fs/dcache.c +11 −0 Original line number Diff line number Diff line Loading @@ -2724,6 +2724,17 @@ char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, return memcpy(buffer, temp, sz); } char *simple_dname(struct dentry *dentry, char *buffer, int buflen) { char *end = buffer + buflen; /* these dentries are never renamed, so d_lock is not needed */ if (prepend(&end, &buflen, " (deleted)", 11) || prepend_name(&end, &buflen, &dentry->d_name) || prepend(&end, &buflen, "/", 1)) end = ERR_PTR(-ENAMETOOLONG); return end; } /* * Write full pathname from the root of the filesystem into the buffer. */ Loading fs/hugetlbfs/inode.c +1 −7 Original line number Diff line number Diff line Loading @@ -916,14 +916,8 @@ static int get_hstate_idx(int page_size_log) return h - hstates; } static char *hugetlb_dname(struct dentry *dentry, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)", dentry->d_name.name); } static struct dentry_operations anon_ops = { .d_dname = hugetlb_dname .d_dname = simple_dname }; /* Loading include/linux/dcache.h +1 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ extern int d_validate(struct dentry *, struct dentry *); * helper function for dentry_operations.d_dname() members */ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); extern char *simple_dname(struct dentry *, char *, int); extern char *__d_path(const struct path *, const struct path *, char *, int); extern char *d_absolute_path(const struct path *, char *, int); Loading mm/shmem.c +1 −7 Original line number Diff line number Diff line Loading @@ -2879,14 +2879,8 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range); /* common code */ static char *shmem_dname(struct dentry *dentry, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)", dentry->d_name.name); } static struct dentry_operations anon_ops = { .d_dname = shmem_dname .d_dname = simple_dname }; /** Loading Loading
fs/dcache.c +11 −0 Original line number Diff line number Diff line Loading @@ -2724,6 +2724,17 @@ char *dynamic_dname(struct dentry *dentry, char *buffer, int buflen, return memcpy(buffer, temp, sz); } char *simple_dname(struct dentry *dentry, char *buffer, int buflen) { char *end = buffer + buflen; /* these dentries are never renamed, so d_lock is not needed */ if (prepend(&end, &buflen, " (deleted)", 11) || prepend_name(&end, &buflen, &dentry->d_name) || prepend(&end, &buflen, "/", 1)) end = ERR_PTR(-ENAMETOOLONG); return end; } /* * Write full pathname from the root of the filesystem into the buffer. */ Loading
fs/hugetlbfs/inode.c +1 −7 Original line number Diff line number Diff line Loading @@ -916,14 +916,8 @@ static int get_hstate_idx(int page_size_log) return h - hstates; } static char *hugetlb_dname(struct dentry *dentry, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)", dentry->d_name.name); } static struct dentry_operations anon_ops = { .d_dname = hugetlb_dname .d_dname = simple_dname }; /* Loading
include/linux/dcache.h +1 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ extern int d_validate(struct dentry *, struct dentry *); * helper function for dentry_operations.d_dname() members */ extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); extern char *simple_dname(struct dentry *, char *, int); extern char *__d_path(const struct path *, const struct path *, char *, int); extern char *d_absolute_path(const struct path *, char *, int); Loading
mm/shmem.c +1 −7 Original line number Diff line number Diff line Loading @@ -2879,14 +2879,8 @@ EXPORT_SYMBOL_GPL(shmem_truncate_range); /* common code */ static char *shmem_dname(struct dentry *dentry, char *buffer, int buflen) { return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)", dentry->d_name.name); } static struct dentry_operations anon_ops = { .d_dname = shmem_dname .d_dname = simple_dname }; /** Loading