]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Set mtime on symbolic links
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 18 Oct 2011 21:51:03 +0000 (14:51 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 18 Oct 2011 22:49:31 +0000 (15:49 -0700)
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 <behlendorf1@llnl.gov>
Closes #412

module/zfs/zpl_inode.c

index dbfe61ab93750dfdbd0474b3d2185b862f7bc10f..17acf371123787d5f73ba838a84840b9d33dd54c 100644 (file)
@@ -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 = {