Skip to content

Commit

Permalink
fuse: readdirplus: change attributes once
Browse files Browse the repository at this point in the history
If we got the inode through fuse_iget() then the attributes are already
up-to-date.

Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Miklos Szeredi committed Jul 17, 2013
1 parent 2914941 commit fa2b721
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,10 @@ static int fuse_direntplus_link(struct file *file,
fi->nlookup++;
spin_unlock(&fc->lock);

fuse_change_attributes(inode, &o->attr,
entry_attr_timeout(o),
attr_version);

/*
* The other branch to 'found' comes via fuse_iget()
* which bumps nlookup inside
Expand Down Expand Up @@ -1291,9 +1295,6 @@ static int fuse_direntplus_link(struct file *file,
}

found:
fuse_change_attributes(inode, &o->attr, entry_attr_timeout(o),
attr_version);

fuse_change_entry_timeout(dentry, o);

err = 0;
Expand Down

0 comments on commit fa2b721

Please sign in to comment.