summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-03-21 16:26:42 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-13 19:23:53 +0300
commit1bbfc848a915081237660d898bbcf50e4a8fc59f (patch)
tree50016a57e5f1e2e8f0521a49a66e5cb0ad637ff9 /fs
parent693d92a1bbc9e42681c42ed190bd42b636ca876f (diff)
downloadblackbird-op-linux-1bbfc848a915081237660d898bbcf50e4a8fc59f.tar.gz
blackbird-op-linux-1bbfc848a915081237660d898bbcf50e4a8fc59f.zip
UBIFS: make debugfs files non-seekable
Turn the debufs files UBIFS maintains into non-seekable. Indeed, none of them is supposed to be seek'ed. Do this by making the '.lseek()' handler to be 'no_llseek()' and by using 'nonseekable_open()' in the '.open()' operation. This does mean an API break but this debugging API is only used by a couple of test scripts which do not rely in the 'llseek()' operation. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 004d3745dc45..da9ecddf028a 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -2784,7 +2784,7 @@ void dbg_debugfs_exit(void)
static int open_debugfs_file(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
- return 0;
+ return nonseekable_open(inode, file);
}
static ssize_t write_debugfs_file(struct file *file, const char __user *buf,
@@ -2814,7 +2814,7 @@ static const struct file_operations dfs_fops = {
.open = open_debugfs_file,
.write = write_debugfs_file,
.owner = THIS_MODULE,
- .llseek = default_llseek,
+ .llseek = no_llseek,
};
/**
OpenPOWER on IntegriCloud