Loading fs/cachefiles/namei.c +2 −1 Original line number Diff line number Diff line Loading @@ -646,7 +646,8 @@ lookup_again: * (this is used to keep track of culling, and atimes are only * updated by read, write and readdir but not lookup or * open) */ touch_atime(cache->mnt, next); path.dentry = next; touch_atime(&path); } /* open a file interface onto a data file */ Loading fs/ecryptfs/file.c +4 −5 Original line number Diff line number Diff line Loading @@ -48,8 +48,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, unsigned long nr_segs, loff_t pos) { ssize_t rc; struct dentry *lower_dentry; struct vfsmount *lower_vfsmount; struct path lower; struct file *file = iocb->ki_filp; rc = generic_file_aio_read(iocb, iov, nr_segs, pos); Loading @@ -60,9 +59,9 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, if (-EIOCBQUEUED == rc) rc = wait_on_sync_kiocb(iocb); if (rc >= 0) { lower_dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); lower_vfsmount = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); touch_atime(lower_vfsmount, lower_dentry); lower.dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); lower.mnt = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); touch_atime(&lower); } return rc; } Loading fs/inode.c +3 −2 Original line number Diff line number Diff line Loading @@ -1499,9 +1499,10 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, * This function automatically handles read only file systems and media, * as well as the "noatime" flag and inode specific "noatime" markers. */ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) void touch_atime(struct path *path) { struct inode *inode = dentry->d_inode; struct vfsmount *mnt = path->mnt; struct inode *inode = path->dentry->d_inode; struct timespec now; if (inode->i_flags & S_NOATIME) Loading fs/namei.c +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p) cond_resched(); current->total_link_count++; touch_atime(link->mnt, dentry); touch_atime(link); nd_set_link(nd, NULL); error = security_inode_follow_link(link->dentry, nd); Loading fs/nfsd/vfs.c +6 −5 Original line number Diff line number Diff line Loading @@ -1541,30 +1541,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, __be32 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) { struct dentry *dentry; struct inode *inode; mm_segment_t oldfs; __be32 err; int host_err; struct path path; err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); if (err) goto out; dentry = fhp->fh_dentry; inode = dentry->d_inode; path.mnt = fhp->fh_export->ex_path.mnt; path.dentry = fhp->fh_dentry; inode = path.dentry->d_inode; err = nfserr_inval; if (!inode->i_op->readlink) goto out; touch_atime(fhp->fh_export->ex_path.mnt, dentry); touch_atime(&path); /* N.B. Why does this call need a get_fs()?? * Remove the set_fs and watch the fireworks:-) --okir */ oldfs = get_fs(); set_fs(KERNEL_DS); host_err = inode->i_op->readlink(dentry, buf, *lenp); host_err = inode->i_op->readlink(path.dentry, buf, *lenp); set_fs(oldfs); if (host_err < 0) Loading Loading
fs/cachefiles/namei.c +2 −1 Original line number Diff line number Diff line Loading @@ -646,7 +646,8 @@ lookup_again: * (this is used to keep track of culling, and atimes are only * updated by read, write and readdir but not lookup or * open) */ touch_atime(cache->mnt, next); path.dentry = next; touch_atime(&path); } /* open a file interface onto a data file */ Loading
fs/ecryptfs/file.c +4 −5 Original line number Diff line number Diff line Loading @@ -48,8 +48,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, unsigned long nr_segs, loff_t pos) { ssize_t rc; struct dentry *lower_dentry; struct vfsmount *lower_vfsmount; struct path lower; struct file *file = iocb->ki_filp; rc = generic_file_aio_read(iocb, iov, nr_segs, pos); Loading @@ -60,9 +59,9 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, if (-EIOCBQUEUED == rc) rc = wait_on_sync_kiocb(iocb); if (rc >= 0) { lower_dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); lower_vfsmount = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); touch_atime(lower_vfsmount, lower_dentry); lower.dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); lower.mnt = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); touch_atime(&lower); } return rc; } Loading
fs/inode.c +3 −2 Original line number Diff line number Diff line Loading @@ -1499,9 +1499,10 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, * This function automatically handles read only file systems and media, * as well as the "noatime" flag and inode specific "noatime" markers. */ void touch_atime(struct vfsmount *mnt, struct dentry *dentry) void touch_atime(struct path *path) { struct inode *inode = dentry->d_inode; struct vfsmount *mnt = path->mnt; struct inode *inode = path->dentry->d_inode; struct timespec now; if (inode->i_flags & S_NOATIME) Loading
fs/namei.c +1 −1 Original line number Diff line number Diff line Loading @@ -642,7 +642,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p) cond_resched(); current->total_link_count++; touch_atime(link->mnt, dentry); touch_atime(link); nd_set_link(nd, NULL); error = security_inode_follow_link(link->dentry, nd); Loading
fs/nfsd/vfs.c +6 −5 Original line number Diff line number Diff line Loading @@ -1541,30 +1541,31 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp, __be32 nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp) { struct dentry *dentry; struct inode *inode; mm_segment_t oldfs; __be32 err; int host_err; struct path path; err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); if (err) goto out; dentry = fhp->fh_dentry; inode = dentry->d_inode; path.mnt = fhp->fh_export->ex_path.mnt; path.dentry = fhp->fh_dentry; inode = path.dentry->d_inode; err = nfserr_inval; if (!inode->i_op->readlink) goto out; touch_atime(fhp->fh_export->ex_path.mnt, dentry); touch_atime(&path); /* N.B. Why does this call need a get_fs()?? * Remove the set_fs and watch the fireworks:-) --okir */ oldfs = get_fs(); set_fs(KERNEL_DS); host_err = inode->i_op->readlink(dentry, buf, *lenp); host_err = inode->i_op->readlink(path.dentry, buf, *lenp); set_fs(oldfs); if (host_err < 0) Loading