]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/reiserfs/xattr_acl.c
[SCSI] lpfc 8.1.2: Added support for FAN
[linux-2.6-omap-h63xx.git] / fs / reiserfs / xattr_acl.c
index a47ac9aac8b2b743c8768091abacdeff0e14ee2c..ab8894c3b9e51b6d589f957b4cf2e8ead3367dfd 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/capability.h>
 #include <linux/fs.h>
 #include <linux/posix_acl.h>
 #include <linux/reiserfs_fs.h>
@@ -174,7 +175,7 @@ static void *posix_acl_to_disk(const struct posix_acl *acl, size_t * size)
 /*
  * Inode operation get_posix_acl().
  *
- * inode->i_sem: down
+ * inode->i_mutex: down
  * BKL held [before 2.5.x]
  */
 struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
@@ -227,7 +228,8 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
                acl = ERR_PTR(retval);
        } else {
                acl = posix_acl_from_disk(value, retval);
-               *p_acl = posix_acl_dup(acl);
+               if (!IS_ERR(acl))
+                       *p_acl = posix_acl_dup(acl);
        }
 
        kfree(value);
@@ -237,7 +239,7 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
 /*
  * Inode operation set_posix_acl().
  *
- * inode->i_sem: down
+ * inode->i_mutex: down
  * BKL held [before 2.5.x]
  */
 static int
@@ -312,7 +314,7 @@ reiserfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        return error;
 }
 
-/* dir->i_sem: down,
+/* dir->i_mutex: locked,
  * inode is new and not released into the wild yet */
 int
 reiserfs_inherit_default_acl(struct inode *dir, struct dentry *dentry,