X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fext2%2Fnamei.c;h=88cecdee07201f96d7e42cadd27d6183d428117c;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=4abd2f06b387a0ba689e71b91adf04140277b282;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c index 4abd2f06b..88cecdee0 100644 --- a/fs/ext2/namei.c +++ b/fs/ext2/namei.c @@ -2,7 +2,8 @@ * linux/fs/ext2/namei.c * * Rewrite to pagecache. Almost all code had been changed, so blame me - * if the things go wrong. Please, send bug reports to viro@math.psu.edu + * if the things go wrong. Please, send bug reports to + * viro@parcelfarce.linux.theplanet.co.uk * * Stuff here is basically a glue between the VFS and generic UNIXish * filesystem that keeps everything in pagecache. All knowledge of the @@ -30,6 +31,7 @@ */ #include +#include #include "ext2.h" #include "xattr.h" #include "acl.h" @@ -80,6 +82,7 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str inode = iget(dir->i_sb, ino); if (!inode) return ERR_PTR(-EACCES); + vx_propagate_xid(nd, inode); } if (inode) return d_splice_alias(inode, dentry); @@ -210,7 +213,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir, if (inode->i_nlink >= EXT2_LINK_MAX) return -EMLINK; - inode->i_ctime = CURRENT_TIME; + inode->i_ctime = CURRENT_TIME_SEC; ext2_inc_count(inode); atomic_inc(&inode->i_count); @@ -336,7 +339,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, goto out_dir; ext2_inc_count(old_inode); ext2_set_link(new_dir, new_de, new_page, old_inode); - new_inode->i_ctime = CURRENT_TIME; + new_inode->i_ctime = CURRENT_TIME_SEC; if (dir_de) new_inode->i_nlink--; ext2_dec_count(new_inode); @@ -361,7 +364,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, * rename. * ext2_dec_count() will mark the inode dirty. */ - old_inode->i_ctime = CURRENT_TIME; + old_inode->i_ctime = CURRENT_TIME_SEC; ext2_delete_entry (old_de, old_page); ext2_dec_count(old_inode); @@ -395,19 +398,23 @@ struct inode_operations ext2_dir_inode_operations = { .rmdir = ext2_rmdir, .mknod = ext2_mknod, .rename = ext2_rename, - .setxattr = ext2_setxattr, - .getxattr = ext2_getxattr, +#ifdef CONFIG_EXT2_FS_XATTR + .setxattr = generic_setxattr, + .getxattr = generic_getxattr, .listxattr = ext2_listxattr, - .removexattr = ext2_removexattr, + .removexattr = generic_removexattr, +#endif .setattr = ext2_setattr, .permission = ext2_permission, }; struct inode_operations ext2_special_inode_operations = { - .setxattr = ext2_setxattr, - .getxattr = ext2_getxattr, +#ifdef CONFIG_EXT2_FS_XATTR + .setxattr = generic_setxattr, + .getxattr = generic_getxattr, .listxattr = ext2_listxattr, - .removexattr = ext2_removexattr, + .removexattr = generic_removexattr, +#endif .setattr = ext2_setattr, .permission = ext2_permission, };