lseek: the "whence" argument is called "whence"
But the kernel decided to call it "origin" instead. Fix most of the sites. Acked-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
c0f041602c
commit
965c8e59cf
@@ -871,7 +871,7 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
|
||||
static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int whence)
|
||||
{
|
||||
struct dentry *dentry = filp->f_path.dentry;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
@@ -880,10 +880,10 @@ static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin)
|
||||
dfprintk(FILE, "NFS: llseek dir(%s/%s, %lld, %d)\n",
|
||||
dentry->d_parent->d_name.name,
|
||||
dentry->d_name.name,
|
||||
offset, origin);
|
||||
offset, whence);
|
||||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
switch (origin) {
|
||||
switch (whence) {
|
||||
case 1:
|
||||
offset += filp->f_pos;
|
||||
case 0:
|
||||
|
@@ -119,18 +119,18 @@ force_reval:
|
||||
return __nfs_revalidate_inode(server, inode);
|
||||
}
|
||||
|
||||
loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
|
||||
loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence)
|
||||
{
|
||||
dprintk("NFS: llseek file(%s/%s, %lld, %d)\n",
|
||||
filp->f_path.dentry->d_parent->d_name.name,
|
||||
filp->f_path.dentry->d_name.name,
|
||||
offset, origin);
|
||||
offset, whence);
|
||||
|
||||
/*
|
||||
* origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
|
||||
* whence == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
|
||||
* the cached file length
|
||||
*/
|
||||
if (origin != SEEK_SET && origin != SEEK_CUR) {
|
||||
if (whence != SEEK_SET && whence != SEEK_CUR) {
|
||||
struct inode *inode = filp->f_mapping->host;
|
||||
|
||||
int retval = nfs_revalidate_file_size(inode, filp);
|
||||
@@ -138,7 +138,7 @@ loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
|
||||
return (loff_t)retval;
|
||||
}
|
||||
|
||||
return generic_file_llseek(filp, offset, origin);
|
||||
return generic_file_llseek(filp, offset, whence);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nfs_file_llseek);
|
||||
|
||||
|
Reference in New Issue
Block a user