Skip to content

Commit

Permalink
afs_fsync: don't bother with ->f_path.dentry
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Nov 19, 2014
1 parent 7119e22 commit 3c981bf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fs/afs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,14 +682,13 @@ int afs_writeback_all(struct afs_vnode *vnode)
*/
int afs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
{
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = file->f_mapping->host;
struct inode *inode = file_inode(file);
struct afs_writeback *wb, *xwb;
struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
struct afs_vnode *vnode = AFS_FS_I(inode);
int ret;

_enter("{%x:%u},{n=%pd},%d",
vnode->fid.vid, vnode->fid.vnode, dentry,
_enter("{%x:%u},{n=%pD},%d",
vnode->fid.vid, vnode->fid.vnode, file,
datasync);

ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
Expand Down

0 comments on commit 3c981bf

Please sign in to comment.