]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ocfs2/namei.c
ocfs2: Add the 'inode64' mount option.
[karo-tx-linux.git] / fs / ocfs2 / namei.c
index ae9ad9587516641366ddcb5753b61a120d9b137b..76d1d13143088a62fe497a8a392c22b80eb23a17 100644 (file)
@@ -60,6 +60,7 @@
 #include "symlink.h"
 #include "sysfile.h"
 #include "uptodate.h"
+#include "xattr.h"
 
 #include "buffer_head_io.h"
 
@@ -424,7 +425,7 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,
        fe->i_fs_generation = cpu_to_le32(osb->fs_generation);
        fe->i_blkno = cpu_to_le64(fe_blkno);
        fe->i_suballoc_bit = cpu_to_le16(suballoc_bit);
-       fe->i_suballoc_slot = cpu_to_le16(osb->slot_num);
+       fe->i_suballoc_slot = cpu_to_le16(inode_ac->ac_alloc_slot);
        fe->i_uid = cpu_to_le32(current->fsuid);
        if (dir->i_mode & S_ISGID) {
                fe->i_gid = cpu_to_le32(dir->i_gid);
@@ -997,7 +998,7 @@ static int ocfs2_rename(struct inode *old_dir,
         *
         * And that's why, just like the VFS, we need a file system
         * rename lock. */
-       if (old_dentry != new_dentry) {
+       if (old_dir != new_dir && S_ISDIR(old_inode->i_mode)) {
                status = ocfs2_rename_lock(osb);
                if (status < 0) {
                        mlog_errno(status);
@@ -1598,10 +1599,10 @@ static int ocfs2_symlink(struct inode *dir,
                u32 offset = 0;
 
                inode->i_op = &ocfs2_symlink_inode_operations;
-               status = ocfs2_do_extend_allocation(osb, inode, &offset, 1, 0,
-                                                   new_fe_bh,
-                                                   handle, data_ac, NULL,
-                                                   NULL);
+               status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0,
+                                             new_fe_bh,
+                                             handle, data_ac, NULL,
+                                             NULL);
                if (status < 0) {
                        if (status != -ENOSPC && status != -EINTR) {
                                mlog(ML_ERROR,
@@ -1918,4 +1919,8 @@ const struct inode_operations ocfs2_dir_iops = {
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
+       .setxattr       = generic_setxattr,
+       .getxattr       = generic_getxattr,
+       .listxattr      = ocfs2_listxattr,
+       .removexattr    = generic_removexattr,
 };