cope with potentially long ->d_dname() output for shmem/hugetlb
dynamic_dname() is both too much and too little for those - the output may be well in excess of 64 bytes dynamic_dname() assumes to be enough (thanks to ashmem feeding really long names to shmem_file_setup()) and vsnprintf() is an overkill for those guys. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cette révision appartient à :
@@ -2909,14 +2909,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
|
||||
};
|
||||
|
||||
/**
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur