sysdep.c 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * linux/fs/hfs/sysdep.c
  3. *
  4. * Copyright (C) 1996 Paul H. Hargrove
  5. * (C) 2003 Ardis Technologies <roman@ardistech.com>
  6. * This file may be distributed under the terms of the GNU General Public License.
  7. *
  8. * This file contains the code to do various system dependent things.
  9. */
  10. #include "hfs_fs.h"
  11. /* dentry case-handling: just lowercase everything */
  12. static int hfs_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
  13. {
  14. struct inode *inode = dentry->d_inode;
  15. int diff;
  16. if(!inode)
  17. return 1;
  18. /* fix up inode on a timezone change */
  19. diff = sys_tz.tz_minuteswest * 60 - HFS_I(inode)->tz_secondswest;
  20. if (diff) {
  21. inode->i_ctime.tv_sec += diff;
  22. inode->i_atime.tv_sec += diff;
  23. inode->i_mtime.tv_sec += diff;
  24. HFS_I(inode)->tz_secondswest += diff;
  25. }
  26. return 1;
  27. }
  28. struct dentry_operations hfs_dentry_operations =
  29. {
  30. .d_revalidate = hfs_revalidate_dentry,
  31. .d_hash = hfs_hash_dentry,
  32. .d_compare = hfs_compare_dentry,
  33. };