Merge commit 'c039c332f23e794deb6d6f37b9f07ff3b27fb2cf' into md
[firefly-linux-kernel-4.4.55.git] / fs / cifs / cifsfs.c
index 8b6e344eb0ba3a483780f0b32cf0961ec258ca4c..a7610cfedf0a20c7c3d22d149d129d1b15e62bd3 100644 (file)
@@ -257,7 +257,6 @@ cifs_alloc_inode(struct super_block *sb)
 static void cifs_i_callback(struct rcu_head *head)
 {
        struct inode *inode = container_of(head, struct inode, i_rcu);
-       INIT_LIST_HEAD(&inode->i_dentry);
        kmem_cache_free(cifs_inode_cachep, CIFS_I(inode));
 }
 
@@ -638,7 +637,10 @@ cifs_do_mount(struct file_system_type *fs_type,
        mnt_data.cifs_sb = cifs_sb;
        mnt_data.flags = flags;
 
-       sb = sget(fs_type, cifs_match_super, cifs_set_super, &mnt_data);
+       /* BB should we make this contingent on mount parm? */
+       flags |= MS_NODIRATIME | MS_NOATIME;
+
+       sb = sget(fs_type, cifs_match_super, cifs_set_super, flags, &mnt_data);
        if (IS_ERR(sb)) {
                root = ERR_CAST(sb);
                cifs_umount(cifs_sb);
@@ -649,10 +651,6 @@ cifs_do_mount(struct file_system_type *fs_type,
                cFYI(1, "Use existing superblock");
                cifs_umount(cifs_sb);
        } else {
-               sb->s_flags = flags;
-               /* BB should we make this contingent on mount parm? */
-               sb->s_flags |= MS_NODIRATIME | MS_NOATIME;
-
                rc = cifs_read_super(sb);
                if (rc) {
                        root = ERR_PTR(rc);
@@ -778,6 +776,7 @@ struct file_system_type cifs_fs_type = {
 };
 const struct inode_operations cifs_dir_inode_ops = {
        .create = cifs_create,
+       .atomic_open = cifs_atomic_open,
        .lookup = cifs_lookup,
        .getattr = cifs_getattr,
        .unlink = cifs_unlink,