Skip to content

Commit

Permalink
Set mtime on symbolic links
Browse files Browse the repository at this point in the history
Register the setattr/getattr callbacks for symlinks.  Without these
the generic inode_setattr() and generic_fillattr() functions will
be used.  In the setattr case this will only result in the inode being
updated in memory, the dirty_inode callback would also normally run
but none is registered for zfs.

The straight forward fix is to set the setattr/getattr callbacks
for symlinks so they are handled just like files and directories.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes #412
  • Loading branch information
behlendorf committed Oct 18, 2011
1 parent 8d35c14 commit 6f2255b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/zpl_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ const struct inode_operations zpl_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = zpl_follow_link,
.put_link = zpl_put_link,
.setattr = zpl_setattr,
.getattr = zpl_getattr,
};

const struct inode_operations zpl_special_inode_operations = {
Expand Down

0 comments on commit 6f2255b

Please sign in to comment.