diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-23 22:45:30 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 12:57:53 +0400 |
commit | 2142914e3eb1168978e842f65cfd182be7582861 (patch) | |
tree | f84e269e7a849b36ccd11789473fd580a4d1265e /fs/read_write.c | |
parent | 5d48f3a2de568ba2c9d06ecbdf995e0702748f22 (diff) |
lseek_execute() doesn't need an inode passed to it
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index fd72b592aa1..37d16e82b57 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -41,8 +41,7 @@ static inline int unsigned_offsets(struct file *file) return file->f_mode & FMODE_UNSIGNED_OFFSET; } -static loff_t lseek_execute(struct file *file, struct inode *inode, - loff_t offset, loff_t maxsize) +static loff_t lseek_execute(struct file *file, loff_t offset, loff_t maxsize) { if (offset < 0 && !unsigned_offsets(file)) return -EINVAL; @@ -76,8 +75,6 @@ loff_t generic_file_llseek_size(struct file *file, loff_t offset, int whence, loff_t maxsize, loff_t eof) { - struct inode *inode = file->f_mapping->host; - switch (whence) { case SEEK_END: offset += eof; @@ -97,8 +94,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence, * like SEEK_SET. */ spin_lock(&file->f_lock); - offset = lseek_execute(file, inode, file->f_pos + offset, - maxsize); + offset = lseek_execute(file, file->f_pos + offset, maxsize); spin_unlock(&file->f_lock); return offset; case SEEK_DATA: @@ -120,7 +116,7 @@ generic_file_llseek_size(struct file *file, loff_t offset, int whence, break; } - return lseek_execute(file, inode, offset, maxsize); + return lseek_execute(file, offset, maxsize); } EXPORT_SYMBOL(generic_file_llseek_size); |