]> exis.tech > repos - linux.git/blobdiff - fs/smb/client/dfs_cache.c
Merge tag 'hwmon-for-v7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
[linux.git] / fs / smb / client / dfs_cache.c
index 83f8cf2f8d2bb680e7c5e59fa065a1ac5c88cab8..8cd93cd2f00f9862a2aa65ad7f48b1fffec9f0cd 100644 (file)
@@ -363,10 +363,10 @@ static struct cache_dfs_tgt *alloc_target(const char *name, int path_consumed)
 {
        struct cache_dfs_tgt *t;
 
-       t = kmalloc_obj(*t, GFP_ATOMIC);
+       t = kmalloc_obj(*t, GFP_KERNEL);
        if (!t)
                return ERR_PTR(-ENOMEM);
-       t->name = kstrdup(name, GFP_ATOMIC);
+       t->name = kstrdup(name, GFP_KERNEL);
        if (!t->name) {
                kfree(t);
                return ERR_PTR(-ENOMEM);
@@ -626,7 +626,7 @@ static int update_cache_entry_locked(struct cache_entry *ce, const struct dfs_in
 
        target = READ_ONCE(ce->tgthint);
        if (target) {
-               th = kstrdup(target->name, GFP_ATOMIC);
+               th = kstrdup(target->name, GFP_KERNEL);
                if (!th)
                        return -ENOMEM;
        }
@@ -760,11 +760,11 @@ static int setup_referral(const char *path, struct cache_entry *ce,
 
        memset(ref, 0, sizeof(*ref));
 
-       ref->path_name = kstrdup(path, GFP_ATOMIC);
+       ref->path_name = kstrdup(path, GFP_KERNEL);
        if (!ref->path_name)
                return -ENOMEM;
 
-       ref->node_name = kstrdup(target, GFP_ATOMIC);
+       ref->node_name = kstrdup(target, GFP_KERNEL);
        if (!ref->node_name) {
                rc = -ENOMEM;
                goto err_free_path;
@@ -1328,7 +1328,7 @@ int dfs_cache_remount_fs(struct cifs_sb_info *cifs_sb)
         * After reconnecting to a different server, unique ids won't match anymore, so we disable
         * serverino. This prevents dentry revalidation to think the dentry are stale (ESTALE).
         */
-       cifs_autodisable_serverino(cifs_sb);
+       cifs_autodisable_serverino(cifs_sb, "DFS failover may potentially connect to a different server, inode numbers won't match anymore", 0);
        /*
         * Force the use of prefix path to support failover on DFS paths that resolve to targets
         * that have different prefix paths.