revert "mm: vmalloc use mutex for purge"
[safe/jmp/linux-2.6] / fs / ocfs2 / symlink.c
index 0c8a129..ed0a0cf 100644 (file)
@@ -50,6 +50,7 @@
 #include "inode.h"
 #include "journal.h"
 #include "symlink.h"
+#include "xattr.h"
 
 #include "buffer_head_io.h"
 
@@ -67,16 +68,9 @@ static char *ocfs2_page_getlink(struct dentry * dentry,
        page = read_mapping_page(mapping, 0, NULL);
        if (IS_ERR(page))
                goto sync_fail;
-       wait_on_page_locked(page);
-       if (!PageUptodate(page))
-               goto async_fail;
        *ppage = page;
        return kmap(page);
 
-async_fail:
-       page_cache_release(page);
-       return ERR_PTR(-EIO);
-
 sync_fail:
        return (char*)page;
 }
@@ -90,11 +84,7 @@ static char *ocfs2_fast_symlink_getlink(struct inode *inode,
 
        mlog_entry_void();
 
-       status = ocfs2_read_block(OCFS2_SB(inode->i_sb),
-                                 OCFS2_I(inode)->ip_blkno,
-                                 bh,
-                                 OCFS2_BH_CACHED,
-                                 inode);
+       status = ocfs2_read_inode_block(inode, bh);
        if (status < 0) {
                mlog_errno(status);
                link = ERR_PTR(status);
@@ -126,6 +116,10 @@ static int ocfs2_readlink(struct dentry *dentry,
                goto out;
        }
 
+       /*
+        * Without vfsmount we can't update atime now,
+        * but we will update atime here ultimately.
+        */
        ret = vfs_readlink(dentry, buffer, buflen, link);
 
        brelse(bh);
@@ -154,26 +148,34 @@ static void *ocfs2_follow_link(struct dentry *dentry,
        }
 
        status = vfs_follow_link(nd, link);
-       if (status)
-               mlog_errno(status);
+
 bail:
        if (page) {
                kunmap(page);
                page_cache_release(page);
        }
-       if (bh)
-               brelse(bh);
+       brelse(bh);
 
        return ERR_PTR(status);
 }
 
-struct inode_operations ocfs2_symlink_inode_operations = {
+const struct inode_operations ocfs2_symlink_inode_operations = {
        .readlink       = page_readlink,
        .follow_link    = ocfs2_follow_link,
        .getattr        = ocfs2_getattr,
+       .setattr        = ocfs2_setattr,
+       .setxattr       = generic_setxattr,
+       .getxattr       = generic_getxattr,
+       .listxattr      = ocfs2_listxattr,
+       .removexattr    = generic_removexattr,
 };
-struct inode_operations ocfs2_fast_symlink_inode_operations = {
+const struct inode_operations ocfs2_fast_symlink_inode_operations = {
        .readlink       = ocfs2_readlink,
        .follow_link    = ocfs2_follow_link,
        .getattr        = ocfs2_getattr,
+       .setattr        = ocfs2_setattr,
+       .setxattr       = generic_setxattr,
+       .getxattr       = generic_getxattr,
+       .listxattr      = ocfs2_listxattr,
+       .removexattr    = generic_removexattr,
 };