[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210504180819.73127-14-andriy.shevchenko@linux.intel.com>
Date: Tue, 4 May 2021 21:08:17 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "J. Bruce Fields" <bfields@...hat.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-nfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Cc: "J. Bruce Fields" <bfields@...ldses.org>,
Chuck Lever <chuck.lever@...cle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andy Shevchenko <andy@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: [PATCH v3 13/15] 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.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
fs/seq_file.c | 7 +------
1 file changed, 1 insertion(+), 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);
--
2.30.2
Powered by blists - more mailing lists