From 6f2255ba8ac93a86ec217775e8f9fc145bc52b39 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 18 Oct 2011 14:51:03 -0700 Subject: [PATCH] Set mtime on symbolic links 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 Closes #412 --- module/zfs/zpl_inode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index dbfe61ab9375..17acf3711237 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -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 = {