diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-08-24 12:08:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-18 10:45:45 -0400 |
commit | ad4c3cc41d6248a80231a6b87f1dab31542f011c (patch) | |
tree | b074753cd8c210c33d32f383623a3ebee569d6c7 /fs/hugetlbfs | |
parent | 92a02b07759bb5cbed4a4793019d14247649925c (diff) |
cope with potentially long ->d_dname() output for shmem/hugetlb
commit 118b23022512eb2f41ce42db70dc0568d00be4ba upstream.
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>
Cc: Colin Cross <ccross@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/hugetlbfs')
-rw-r--r-- | fs/hugetlbfs/inode.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index a3f868ae3fd4..4e5f332f15d9 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -916,14 +916,8 @@ static int get_hstate_idx(int page_size_log) | |||
916 | return h - hstates; | 916 | return h - hstates; |
917 | } | 917 | } |
918 | 918 | ||
919 | static char *hugetlb_dname(struct dentry *dentry, char *buffer, int buflen) | ||
920 | { | ||
921 | return dynamic_dname(dentry, buffer, buflen, "/%s (deleted)", | ||
922 | dentry->d_name.name); | ||
923 | } | ||
924 | |||
925 | static struct dentry_operations anon_ops = { | 919 | static struct dentry_operations anon_ops = { |
926 | .d_dname = hugetlb_dname | 920 | .d_dname = simple_dname |
927 | }; | 921 | }; |
928 | 922 | ||
929 | /* | 923 | /* |