vfs: Remove {get,set,remove}xattr inode operations
[cascardo/linux.git] / fs / cifs / cifsfs.c
index 5d841f3..34aac1c 100644 (file)
@@ -609,6 +609,9 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
        char *s, *p;
        char sep;
 
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH)
+               return dget(sb->s_root);
+
        full_path = cifs_build_path_to_root(vol, cifs_sb,
                                            cifs_sb_master_tcon(cifs_sb));
        if (full_path == NULL)
@@ -686,10 +689,14 @@ cifs_do_mount(struct file_system_type *fs_type,
        cifs_sb->mountdata = kstrndup(data, PAGE_SIZE, GFP_KERNEL);
        if (cifs_sb->mountdata == NULL) {
                root = ERR_PTR(-ENOMEM);
-               goto out_cifs_sb;
+               goto out_free;
        }
 
-       cifs_setup_cifs_sb(volume_info, cifs_sb);
+       rc = cifs_setup_cifs_sb(volume_info, cifs_sb);
+       if (rc) {
+               root = ERR_PTR(rc);
+               goto out_free;
+       }
 
        rc = cifs_mount(cifs_sb, volume_info);
        if (rc) {
@@ -697,7 +704,7 @@ cifs_do_mount(struct file_system_type *fs_type,
                        cifs_dbg(VFS, "cifs_mount failed w/return code = %d\n",
                                 rc);
                root = ERR_PTR(rc);
-               goto out_mountdata;
+               goto out_free;
        }
 
        mnt_data.vol = volume_info;
@@ -740,9 +747,9 @@ out:
        cifs_cleanup_volume_info(volume_info);
        return root;
 
-out_mountdata:
+out_free:
+       kfree(cifs_sb->prepath);
        kfree(cifs_sb->mountdata);
-out_cifs_sb:
        kfree(cifs_sb);
 out_nls:
        unload_nls(volume_info->local_nls);
@@ -894,30 +901,21 @@ const struct inode_operations cifs_dir_inode_ops = {
        .setattr = cifs_setattr,
        .symlink = cifs_symlink,
        .mknod   = cifs_mknod,
-       .setxattr = generic_setxattr,
-       .getxattr = generic_getxattr,
        .listxattr = cifs_listxattr,
-       .removexattr = generic_removexattr,
 };
 
 const struct inode_operations cifs_file_inode_ops = {
        .setattr = cifs_setattr,
        .getattr = cifs_getattr,
        .permission = cifs_permission,
-       .setxattr = generic_setxattr,
-       .getxattr = generic_getxattr,
        .listxattr = cifs_listxattr,
-       .removexattr = generic_removexattr,
 };
 
 const struct inode_operations cifs_symlink_inode_ops = {
        .readlink = generic_readlink,
        .get_link = cifs_get_link,
        .permission = cifs_permission,
-       .setxattr = generic_setxattr,
-       .getxattr = generic_getxattr,
        .listxattr = cifs_listxattr,
-       .removexattr = generic_removexattr,
 };
 
 static int cifs_clone_file_range(struct file *src_file, loff_t off,