Push to branch refs/heads/master:
0495fe27a1b950d5d1cefb2d7ec962d666fc8f45 -->
  964912d2aaeaf6695a8070fbeba157ee12287c4d

 fs/wrapfs/dentry.c |  6 +++---
 fs/wrapfs/file.c   |  6 +++---
 fs/wrapfs/inode.c  |  6 +++---
 fs/wrapfs/lookup.c | 22 ++++++++++------------
 fs/wrapfs/main.c   |  6 +++---
 fs/wrapfs/mmap.c   |  6 +++---
 fs/wrapfs/super.c  |  6 +++---
 fs/wrapfs/wrapfs.h |  6 +++---
 8 files changed, 31 insertions(+), 33 deletions(-)

commit 964912d2aaeaf6695a8070fbeba157ee12287c4d
Author: Erez Zadok <e...@cs.sunysb.edu>
Date:   Sat Feb 18 19:11:24 2017 -0500

    Wrapfs: ->iget fixes
    
    Change where we igrab/iput to ensure we always hold a valid lower_inode.
    Return ENOMEM (not EACCES) if iget5_locked returns NULL.
    
    Signed-off-by: Erez Zadok <e...@cs.sunysb.edu>

commit f2d7af8d80ed4ef9d18640884ec20eb8ac71980c
Author: Erez Zadok <e...@cs.sunysb.edu>
Date:   Sat Feb 18 15:33:36 2017 -0500

    Wrapfs: update copyrights for 2017
    
    Signed-off-by: Erez Zadok <e...@cs.sunysb.edu>

diff --git a/fs/wrapfs/dentry.c b/fs/wrapfs/dentry.c
index a0f0e0d..f2b3ac1 100644
--- a/fs/wrapfs/dentry.c
+++ b/fs/wrapfs/dentry.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/file.c b/fs/wrapfs/file.c
index 05b80e9..9f054163 100644
--- a/fs/wrapfs/file.c
+++ b/fs/wrapfs/file.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/inode.c b/fs/wrapfs/inode.c
index 07c6aa9..e657a2f 100644
--- a/fs/wrapfs/inode.c
+++ b/fs/wrapfs/inode.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/lookup.c b/fs/wrapfs/lookup.c
index eae79ba..32faef5 100644
--- a/fs/wrapfs/lookup.c
+++ b/fs/wrapfs/lookup.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -73,8 +73,9 @@ struct inode *wrapfs_iget(struct super_block *sb, struct 
inode *lower_inode)
 {
        struct wrapfs_inode_info *info;
        struct inode *inode; /* the new inode to return */
-       int err;
 
+       if (!igrab(lower_inode))
+               return ERR_PTR(-ESTALE);
        inode = iget5_locked(sb, /* our superblock */
                             /*
                              * hashval: we use inode number, but we can
@@ -86,22 +87,19 @@ struct inode *wrapfs_iget(struct super_block *sb, struct 
inode *lower_inode)
                             wrapfs_inode_set, /* inode init function */
                             lower_inode); /* data passed to test+set fxns */
        if (!inode) {
-               err = -EACCES;
                iput(lower_inode);
-               return ERR_PTR(err);
+               return ERR_PTR(-ENOMEM);
        }
-       /* if found a cached inode, then just return it */
-       if (!(inode->i_state & I_NEW))
+       /* if found a cached inode, then just return it (after iput) */
+       if (!(inode->i_state & I_NEW)) {
+               iput(lower_inode);
                return inode;
+       }
 
        /* initialize new inode */
        info = WRAPFS_I(inode);
 
        inode->i_ino = lower_inode->i_ino;
-       if (!igrab(lower_inode)) {
-               err = -ESTALE;
-               return ERR_PTR(err);
-       }
        wrapfs_set_lower_inode(inode, lower_inode);
 
        inode->i_version++;
diff --git a/fs/wrapfs/main.c b/fs/wrapfs/main.c
index c39ef09..7ed0580e 100644
--- a/fs/wrapfs/main.c
+++ b/fs/wrapfs/main.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/mmap.c b/fs/wrapfs/mmap.c
index cfbc0f8..39364ec 100644
--- a/fs/wrapfs/mmap.c
+++ b/fs/wrapfs/mmap.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/super.c b/fs/wrapfs/super.c
index 5c99c47..a17fef9 100644
--- a/fs/wrapfs/super.c
+++ b/fs/wrapfs/super.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/fs/wrapfs/wrapfs.h b/fs/wrapfs/wrapfs.h
index 149b27a..ea98f30 100644
--- a/fs/wrapfs/wrapfs.h
+++ b/fs/wrapfs/wrapfs.h
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 1998-2015 Erez Zadok
+ * Copyright (c) 1998-2017 Erez Zadok
  * Copyright (c) 2009     Shrikar Archak
- * Copyright (c) 2003-2015 Stony Brook University
- * Copyright (c) 2003-2015 The Research Foundation of SUNY
+ * Copyright (c) 2003-2017 Stony Brook University
+ * Copyright (c) 2003-2017 The Research Foundation of SUNY
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as

_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
unionfs-cvs@fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to