]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/dcache.c
xfs: always swap the cow forks when swapping extents
[mirror_ubuntu-artful-kernel.git] / fs / dcache.c
index 6c30be668487ca53725efc2229ac64dce68b9abc..3203470c59c2087847578ed0cc2ddb2a65b6d840 100644 (file)
@@ -90,6 +90,11 @@ EXPORT_SYMBOL(rename_lock);
 
 static struct kmem_cache *dentry_cache __read_mostly;
 
+const struct qstr empty_name = QSTR_INIT("", 0);
+EXPORT_SYMBOL(empty_name);
+const struct qstr slash_name = QSTR_INIT("/", 1);
+EXPORT_SYMBOL(slash_name);
+
 /*
  * This is the single most critical data structure when it comes
  * to the dcache: the hashtable for lookups. Somebody should try
@@ -1192,7 +1197,7 @@ enum d_walk_ret {
  *
  * The @enter() and @finish() callbacks are called with d_lock held.
  */
-static void d_walk(struct dentry *parent, void *data,
+void d_walk(struct dentry *parent, void *data,
                   enum d_walk_ret (*enter)(void *, struct dentry *),
                   void (*finish)(void *))
 {
@@ -1300,6 +1305,7 @@ rename_retry:
        seq = 1;
        goto again;
 }
+EXPORT_SYMBOL_GPL(d_walk);
 
 struct check_mount {
        struct vfsmount *mnt;
@@ -1606,8 +1612,7 @@ struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
         */
        dentry->d_iname[DNAME_INLINE_LEN-1] = 0;
        if (unlikely(!name)) {
-               static const struct qstr anon = QSTR_INIT("/", 1);
-               name = &anon;
+               name = &slash_name;
                dname = dentry->d_iname;
        } else if (name->len > DNAME_INLINE_LEN-1) {
                size_t size = offsetof(struct external_name, name[1]);
@@ -2890,6 +2895,7 @@ void d_exchange(struct dentry *dentry1, struct dentry *dentry2)
 
        write_sequnlock(&rename_lock);
 }
+EXPORT_SYMBOL_GPL(d_exchange);
 
 /**
  * d_ancestor - search for an ancestor