Patchwork UBIFS: do not change debugfs file position

login
register
mail settings
Submitter Artem Bityutskiy
Date April 24, 2011, 10:02 a.m.
Message ID <1303639337-15836-1-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/92653/
State Accepted
Commit 341e262f903afbb8c23133ed6e193ea6254f73c4
Headers show

Comments

Artem Bityutskiy - April 24, 2011, 10:02 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

This patch is a tiny improvement which removes few bytes of code.
UBIFS debugfs files are non-seekable and the file position is ignored,
so do not increase it in the write handler.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/debug.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Patch

diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index ba4d795..d64cd21 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2822,7 +2822,6 @@  static ssize_t write_debugfs_file(struct file *file, const char __user *buf,
 	} else
 		return -EINVAL;
 
-	*ppos += count;
 	return count;
 }