]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/ocfs2/file.c
ocfs2: Add extended attribute support
[linux-beck.git] / fs / ocfs2 / file.c
index 7bb4fde70054b72ffdbb79e281c6de3f81a39c8a..f4273c2c20959e3898e0f77ba54198ae74b309f2 100644 (file)
@@ -55,6 +55,7 @@
 #include "mmap.h"
 #include "suballoc.h"
 #include "super.h"
+#include "xattr.h"
 
 #include "buffer_head_io.h"
 
@@ -515,7 +516,7 @@ int ocfs2_add_inode_data(struct ocfs2_super *osb,
                                           clusters_to_add, mark_unwritten,
                                           fe_bh, el, handle,
                                           data_ac, meta_ac, reason_ret,
-                                          OCFS2_DINODE_EXTENT);
+                                          OCFS2_DINODE_EXTENT, NULL);
 }
 
 static int __ocfs2_extend_allocation(struct inode *inode, u32 logical_start,
@@ -565,7 +566,7 @@ restart_all:
             clusters_to_add);
        status = ocfs2_lock_allocators(inode, bh, &fe->id2.i_list,
                                       clusters_to_add, 0, &data_ac,
-                                      &meta_ac);
+                                      &meta_ac, OCFS2_DINODE_EXTENT, NULL);
        if (status) {
                mlog_errno(status);
                goto leave;
@@ -1237,7 +1238,8 @@ static int __ocfs2_remove_inode_range(struct inode *inode,
        struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
 
        ret = ocfs2_lock_allocators(inode, di_bh, &di->id2.i_list,
-                                   0, 1, NULL, &meta_ac);
+                                   0, 1, NULL, &meta_ac,
+                                   OCFS2_DINODE_EXTENT, NULL);
        if (ret) {
                mlog_errno(ret);
                return ret;
@@ -1268,7 +1270,7 @@ static int __ocfs2_remove_inode_range(struct inode *inode,
        }
 
        ret = ocfs2_remove_extent(inode, di_bh, cpos, len, handle, meta_ac,
-                                 dealloc, OCFS2_DINODE_EXTENT);
+                                 dealloc, OCFS2_DINODE_EXTENT, NULL);
        if (ret) {
                mlog_errno(ret);
                goto out_commit;
@@ -2069,6 +2071,10 @@ const struct inode_operations ocfs2_file_iops = {
        .setattr        = ocfs2_setattr,
        .getattr        = ocfs2_getattr,
        .permission     = ocfs2_permission,
+       .setxattr       = generic_setxattr,
+       .getxattr       = generic_getxattr,
+       .listxattr      = ocfs2_listxattr,
+       .removexattr    = generic_removexattr,
        .fallocate      = ocfs2_fallocate,
        .fiemap         = ocfs2_fiemap,
 };