]> err.no Git - linux-2.6/blobdiff - fs/jffs2/acl.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[linux-2.6] / fs / jffs2 / acl.c
index 320dd48b834ee48beaa821daede6fd1d2c9f99ae..a46101ee867afa22e5ee94f8161610433fffc00f 100644 (file)
@@ -1,16 +1,18 @@
 /*
  * JFFS2 -- Journalling Flash File System, Version 2.
  *
- * Copyright (C) 2006  NEC Corporation
+ * Copyright © 2006  NEC Corporation
  *
  * Created by KaiGai Kohei <kaigai@ak.jp.nec.com>
  *
  * For licensing information, see the file 'LICENCE' in this directory.
  *
  */
+
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/fs.h>
+#include <linux/sched.h>
 #include <linux/time.h>
 #include <linux/crc32.h>
 #include <linux/jffs2.h>
@@ -267,6 +269,8 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        }
 
        rc = do_jffs2_setxattr(inode, xprefix, "", value, size, 0);
+       if (!value && rc == -ENODATA)
+               rc = 0;
        if (value)
                kfree(value);
        if (!rc) {
@@ -343,10 +347,8 @@ int jffs2_init_acl(struct inode *inode, struct inode *dir)
        return rc;
 }
 
-void jffs2_clear_acl(struct inode *inode)
+void jffs2_clear_acl(struct jffs2_inode_info *f)
 {
-       struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode);
-
        if (f->i_acl_access && f->i_acl_access != JFFS2_ACL_NOT_CACHED) {
                posix_acl_release(f->i_acl_access);
                f->i_acl_access = JFFS2_ACL_NOT_CACHED;