Commit df37f627 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s/UPDATE_ATIME/update_atime/ cleanup

From:  Stewart Smith <stewartsmith@mac.com>

Remove the UPDATE_ATIME() macro, use update_atime() directly.
parent b7bd1dee
...@@ -1527,7 +1527,7 @@ random_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos) ...@@ -1527,7 +1527,7 @@ random_read(struct file * file, char * buf, size_t nbytes, loff_t *ppos)
* If we gave the user some bytes, update the access time. * If we gave the user some bytes, update the access time.
*/ */
if (count != 0) { if (count != 0) {
UPDATE_ATIME(file->f_dentry->d_inode); update_atime(file->f_dentry->d_inode);
} }
return (count ? count : retval); return (count ? count : retval);
......
...@@ -65,7 +65,7 @@ static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir) ...@@ -65,7 +65,7 @@ static int bfs_readdir(struct file * f, void * dirent, filldir_t filldir)
brelse(bh); brelse(bh);
} }
UPDATE_ATIME(dir); update_atime(dir);
unlock_kernel(); unlock_kernel();
return 0; return 0;
} }
......
...@@ -310,7 +310,7 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir) ...@@ -310,7 +310,7 @@ ext2_readdir (struct file * filp, void * dirent, filldir_t filldir)
done: done:
filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset; filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
filp->f_version = inode->i_version; filp->f_version = inode->i_version;
UPDATE_ATIME(inode); update_atime(inode);
return 0; return 0;
} }
......
...@@ -216,7 +216,7 @@ static int ext3_readdir(struct file * filp, ...@@ -216,7 +216,7 @@ static int ext3_readdir(struct file * filp,
offset = 0; offset = 0;
brelse (bh); brelse (bh);
} }
UPDATE_ATIME(inode); update_atime(inode);
out: out:
return ret; return ret;
} }
...@@ -489,7 +489,7 @@ static int ext3_dx_readdir(struct file * filp, ...@@ -489,7 +489,7 @@ static int ext3_dx_readdir(struct file * filp,
} }
finished: finished:
info->last_pos = filp->f_pos; info->last_pos = filp->f_pos;
UPDATE_ATIME(inode); update_atime(inode);
return 0; return 0;
} }
......
...@@ -62,7 +62,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -62,7 +62,7 @@ static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma)
down(&inode->i_sem); down(&inode->i_sem);
UPDATE_ATIME(inode); update_atime(inode);
vma->vm_flags |= VM_HUGETLB | VM_RESERVED; vma->vm_flags |= VM_HUGETLB | VM_RESERVED;
vma->vm_ops = &hugetlb_vm_ops; vma->vm_ops = &hugetlb_vm_ops;
ret = hugetlb_prefault(mapping, vma); ret = hugetlb_prefault(mapping, vma);
......
...@@ -127,7 +127,7 @@ static int minix_readdir(struct file * filp, void * dirent, filldir_t filldir) ...@@ -127,7 +127,7 @@ static int minix_readdir(struct file * filp, void * dirent, filldir_t filldir)
done: done:
filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset; filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
UPDATE_ATIME(inode); update_atime(inode);
unlock_kernel(); unlock_kernel();
return 0; return 0;
} }
......
...@@ -405,7 +405,7 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -405,7 +405,7 @@ static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
goto loop; goto loop;
current->link_count++; current->link_count++;
current->total_link_count++; current->total_link_count++;
UPDATE_ATIME(dentry->d_inode); update_atime(dentry->d_inode);
err = dentry->d_inode->i_op->follow_link(dentry, nd); err = dentry->d_inode->i_op->follow_link(dentry, nd);
current->link_count--; current->link_count--;
return err; return err;
...@@ -1327,7 +1327,7 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd) ...@@ -1327,7 +1327,7 @@ int open_namei(const char * pathname, int flag, int mode, struct nameidata *nd)
error = security_inode_follow_link(dentry, nd); error = security_inode_follow_link(dentry, nd);
if (error) if (error)
goto exit_dput; goto exit_dput;
UPDATE_ATIME(dentry->d_inode); update_atime(dentry->d_inode);
error = dentry->d_inode->i_op->follow_link(dentry, nd); error = dentry->d_inode->i_op->follow_link(dentry, nd);
dput(dentry); dput(dentry);
if (error) if (error)
......
...@@ -682,7 +682,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr) ...@@ -682,7 +682,7 @@ __nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
* such as stat(2) */ * such as stat(2) */
inode->i_ino = hash; inode->i_ino = hash;
/* We can't support UPDATE_ATIME(), since the server will reset it */ /* We can't support update_atime(), since the server will reset it */
inode->i_flags |= S_NOATIME; inode->i_flags |= S_NOATIME;
inode->i_mode = fattr->mode; inode->i_mode = fattr->mode;
/* Why so? Because we want revalidate for devices/FIFOs, and /* Why so? Because we want revalidate for devices/FIFOs, and
......
...@@ -1124,7 +1124,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) ...@@ -1124,7 +1124,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
if (!inode->i_op || !inode->i_op->readlink) if (!inode->i_op || !inode->i_op->readlink)
goto out; goto out;
UPDATE_ATIME(inode); update_atime(inode);
/* N.B. Why does this call need a get_fs()?? /* N.B. Why does this call need a get_fs()??
* Remove the set_fs and watch the fireworks:-) --okir * Remove the set_fs and watch the fireworks:-) --okir
*/ */
......
...@@ -1736,7 +1736,7 @@ void ntfs_read_inode_mount(struct inode *vi) ...@@ -1736,7 +1736,7 @@ void ntfs_read_inode_mount(struct inode *vi)
* @vi: inode to mark dirty * @vi: inode to mark dirty
* *
* This is called from fs/inode.c::__mark_inode_dirty(), when the inode itself * This is called from fs/inode.c::__mark_inode_dirty(), when the inode itself
* is being marked dirty. An example is when UPDATE_ATIME() is invoked. * is being marked dirty. An example is when update_atime() is invoked.
* *
* We mark the inode dirty by setting both the page in which the mft record * We mark the inode dirty by setting both the page in which the mft record
* resides and the buffer heads in that page which correspond to the mft record * resides and the buffer heads in that page which correspond to the mft record
......
...@@ -121,7 +121,7 @@ pipe_read(struct file *filp, char *buf, size_t count, loff_t *ppos) ...@@ -121,7 +121,7 @@ pipe_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT); kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
} }
if (ret > 0) if (ret > 0)
UPDATE_ATIME(inode); update_atime(inode);
return ret; return ret;
} }
......
...@@ -76,7 +76,7 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -76,7 +76,7 @@ static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir)
} }
brelse(bh); brelse(bh);
} }
UPDATE_ATIME(inode); update_atime(inode);
out: out:
unlock_kernel(); unlock_kernel();
......
...@@ -185,7 +185,7 @@ static int reiserfs_readdir (struct file * filp, void * dirent, filldir_t filldi ...@@ -185,7 +185,7 @@ static int reiserfs_readdir (struct file * filp, void * dirent, filldir_t filldi
filp->f_pos = next_pos; filp->f_pos = next_pos;
pathrelse (&path_to_entry); pathrelse (&path_to_entry);
reiserfs_check_path(&path_to_entry) ; reiserfs_check_path(&path_to_entry) ;
UPDATE_ATIME(inode) ; update_atime(inode) ;
out: out:
reiserfs_write_unlock(inode->i_sb); reiserfs_write_unlock(inode->i_sb);
return ret; return ret;
......
...@@ -244,7 +244,7 @@ asmlinkage long sys_readlink(const char __user * path, char __user * buf, int bu ...@@ -244,7 +244,7 @@ asmlinkage long sys_readlink(const char __user * path, char __user * buf, int bu
if (inode->i_op && inode->i_op->readlink) { if (inode->i_op && inode->i_op->readlink) {
error = security_inode_readlink(nd.dentry); error = security_inode_readlink(nd.dentry);
if (!error) { if (!error) {
UPDATE_ATIME(inode); update_atime(inode);
error = inode->i_op->readlink(nd.dentry, buf, bufsiz); error = inode->i_op->readlink(nd.dentry, buf, bufsiz);
} }
} }
......
...@@ -116,7 +116,7 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir) ...@@ -116,7 +116,7 @@ static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
done: done:
filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset; filp->f_pos = (n << PAGE_CACHE_SHIFT) | offset;
UPDATE_ATIME(inode); update_atime(inode);
unlock_kernel(); unlock_kernel();
return 0; return 0;
} }
......
...@@ -98,7 +98,7 @@ int udf_readdir(struct file *filp, void *dirent, filldir_t filldir) ...@@ -98,7 +98,7 @@ int udf_readdir(struct file *filp, void *dirent, filldir_t filldir)
} }
result = do_udf_readdir(dir, filp, filldir, dirent); result = do_udf_readdir(dir, filp, filldir, dirent);
UPDATE_ATIME(dir); update_atime(dir);
unlock_kernel(); unlock_kernel();
return result; return result;
} }
......
...@@ -166,7 +166,7 @@ ufs_readdir (struct file * filp, void * dirent, filldir_t filldir) ...@@ -166,7 +166,7 @@ ufs_readdir (struct file * filp, void * dirent, filldir_t filldir)
offset = 0; offset = 0;
brelse (bh); brelse (bh);
} }
UPDATE_ATIME(inode); update_atime(inode);
unlock_kernel(); unlock_kernel();
return 0; return 0;
} }
......
...@@ -206,8 +206,8 @@ extern int leases_enable, dir_notify_enable, lease_break_time; ...@@ -206,8 +206,8 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
/* Used to be a macro which just called the function, now just a function */
extern void update_atime (struct inode *); extern void update_atime (struct inode *);
#define UPDATE_ATIME(inode) update_atime (inode)
extern void inode_init(unsigned long); extern void inode_init(unsigned long);
extern void mnt_init(unsigned long); extern void mnt_init(unsigned long);
......
...@@ -149,7 +149,7 @@ static void shm_close (struct vm_area_struct *shmd) ...@@ -149,7 +149,7 @@ static void shm_close (struct vm_area_struct *shmd)
static int shm_mmap(struct file * file, struct vm_area_struct * vma) static int shm_mmap(struct file * file, struct vm_area_struct * vma)
{ {
UPDATE_ATIME(file->f_dentry->d_inode); update_atime(file->f_dentry->d_inode);
vma->vm_ops = &shm_vm_ops; vma->vm_ops = &shm_vm_ops;
shm_inc(file->f_dentry->d_inode->i_ino); shm_inc(file->f_dentry->d_inode->i_ino);
return 0; return 0;
......
...@@ -681,7 +681,7 @@ void do_generic_mapping_read(struct address_space *mapping, ...@@ -681,7 +681,7 @@ void do_generic_mapping_read(struct address_space *mapping,
*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset; *ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
if (cached_page) if (cached_page)
page_cache_release(cached_page); page_cache_release(cached_page);
UPDATE_ATIME(inode); update_atime(inode);
} }
int file_read_actor(read_descriptor_t *desc, struct page *page, int file_read_actor(read_descriptor_t *desc, struct page *page,
...@@ -774,7 +774,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, ...@@ -774,7 +774,7 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
if (retval > 0) if (retval > 0)
*ppos = pos + retval; *ppos = pos + retval;
} }
UPDATE_ATIME(filp->f_dentry->d_inode); update_atime(filp->f_dentry->d_inode);
goto out; goto out;
} }
...@@ -1259,7 +1259,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma) ...@@ -1259,7 +1259,7 @@ int generic_file_mmap(struct file * file, struct vm_area_struct * vma)
if (!mapping->a_ops->readpage) if (!mapping->a_ops->readpage)
return -ENOEXEC; return -ENOEXEC;
UPDATE_ATIME(inode); update_atime(inode);
vma->vm_ops = &generic_file_vm_ops; vma->vm_ops = &generic_file_vm_ops;
return 0; return 0;
} }
......
...@@ -1013,7 +1013,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -1013,7 +1013,7 @@ static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
ops = &shmem_vm_ops; ops = &shmem_vm_ops;
if (!inode->i_sb || !S_ISREG(inode->i_mode)) if (!inode->i_sb || !S_ISREG(inode->i_mode))
return -EACCES; return -EACCES;
UPDATE_ATIME(inode); update_atime(inode);
vma->vm_ops = ops; vma->vm_ops = ops;
return 0; return 0;
} }
...@@ -1307,7 +1307,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_ ...@@ -1307,7 +1307,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
} }
*ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset; *ppos = ((loff_t) index << PAGE_CACHE_SHIFT) + offset;
UPDATE_ATIME(inode); update_atime(inode);
} }
static ssize_t shmem_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos) static ssize_t shmem_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos)
......
...@@ -625,7 +625,7 @@ static unix_socket *unix_find_other(struct sockaddr_un *sunname, int len, ...@@ -625,7 +625,7 @@ static unix_socket *unix_find_other(struct sockaddr_un *sunname, int len,
goto put_fail; goto put_fail;
if (u->type == type) if (u->type == type)
UPDATE_ATIME(nd.dentry->d_inode); update_atime(nd.dentry->d_inode);
path_release(&nd); path_release(&nd);
...@@ -641,7 +641,7 @@ static unix_socket *unix_find_other(struct sockaddr_un *sunname, int len, ...@@ -641,7 +641,7 @@ static unix_socket *unix_find_other(struct sockaddr_un *sunname, int len,
struct dentry *dentry; struct dentry *dentry;
dentry = unix_sk(u)->dentry; dentry = unix_sk(u)->dentry;
if (dentry) if (dentry)
UPDATE_ATIME(dentry->d_inode); update_atime(dentry->d_inode);
} else } else
goto fail; goto fail;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment