Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  *  linux/fs/hfs/sysdep.c
0003  *
0004  * Copyright (C) 1996  Paul H. Hargrove
0005  * (C) 2003 Ardis Technologies <roman@ardistech.com>
0006  * This file may be distributed under the terms of the GNU General Public License.
0007  *
0008  * This file contains the code to do various system dependent things.
0009  */
0010 
0011 #include <linux/namei.h>
0012 #include "hfs_fs.h"
0013 
0014 /* dentry case-handling: just lowercase everything */
0015 
0016 static int hfs_revalidate_dentry(struct dentry *dentry, unsigned int flags)
0017 {
0018     struct inode *inode;
0019     int diff;
0020 
0021     if (flags & LOOKUP_RCU)
0022         return -ECHILD;
0023 
0024     inode = d_inode(dentry);
0025     if(!inode)
0026         return 1;
0027 
0028     /* fix up inode on a timezone change */
0029     diff = sys_tz.tz_minuteswest * 60 - HFS_I(inode)->tz_secondswest;
0030     if (diff) {
0031         inode->i_ctime.tv_sec += diff;
0032         inode->i_atime.tv_sec += diff;
0033         inode->i_mtime.tv_sec += diff;
0034         HFS_I(inode)->tz_secondswest += diff;
0035     }
0036     return 1;
0037 }
0038 
0039 const struct dentry_operations hfs_dentry_operations =
0040 {
0041     .d_revalidate   = hfs_revalidate_dentry,
0042     .d_hash     = hfs_hash_dentry,
0043     .d_compare  = hfs_compare_dentry,
0044 };
0045