summaryrefslogtreecommitdiff
path: root/fs/seq_file.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-06-30 18:55:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-01 11:06:05 -0700
commitfc3de02eae89a1eb4a964b7b0a05bfb717904700 (patch)
tree8948fe54063239e9d1439324ab9f6746e0c4d949 /fs/seq_file.c
parente7ed4a3b922b04d2042cd2e19d1096fa457b6c11 (diff)
seq_file: convert seq_escape() to use seq_escape_str()
Convert seq_escape() to use seq_escape_str() rather than open coding it. Note, for now we leave it as an exported symbol due to some old code that can't tolerate ctype.h being (indirectly) included. Link: https://lkml.kernel.org/r/20210504180819.73127-14-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Chuck Lever <chuck.lever@oracle.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/seq_file.c')
-rw-r--r--fs/seq_file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 532cac2eae0f..08f54029c2b1 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -392,12 +392,7 @@ EXPORT_SYMBOL(seq_escape_mem);
*/
void seq_escape(struct seq_file *m, const char *s, const char *esc)
{
- char *buf;
- size_t size = seq_get_buf(m, &buf);
- int ret;
-
- ret = string_escape_str(s, buf, size, ESCAPE_OCTAL, esc);
- seq_commit(m, ret < size ? ret : -1);
+ seq_escape_str(m, s, ESCAPE_OCTAL, esc);
}
EXPORT_SYMBOL(seq_escape);