Unionfs: fix unix sockets
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 24 Sep 2009 02:28:35 +0000 (22:28 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Thu, 24 Sep 2009 02:28:35 +0000 (22:28 -0400)
Properly instantiate them as new inodes.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/main.c

index b122de6c361986d56dc9475fea7b72d929b8732f..71ee412b68524cdbe9d050b140d0e7c57cd3fe1c 100644 (file)
@@ -129,6 +129,12 @@ skip:
        /* only (our) lookup wants to do a d_add */
        switch (flag) {
        case INTERPOSE_DEFAULT:
+               /* for operations which create new inodes */
+               if (S_ISSOCK(inode->i_mode))
+                       d_add(dentry, inode);
+               else
+                       d_instantiate(dentry, inode);
+               break;
        case INTERPOSE_REVAL_NEG:
                d_instantiate(dentry, inode);
                break;