* 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
*/
#include <linux/pagemap.h>
+#include <linux/vserver/xid.h>
#include "ext2.h"
#include "xattr.h"
#include "acl.h"
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);
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);
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);
* 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);
.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,
};