]> Pileus Git - ~andy/linux/blobdiff - fs/namei.c
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
[~andy/linux] / fs / namei.c
index 3531deebad3084104e6a9fca7116ba68890ad5af..d580df2e6804d0863d555234388a34397387c3e6 100644 (file)
@@ -209,7 +209,6 @@ getname(const char __user * filename)
 {
        return getname_flags(filename, 0, NULL);
 }
-EXPORT_SYMBOL(getname);
 
 #ifdef CONFIG_AUDITSYSCALL
 void putname(struct filename *name)
@@ -235,27 +234,9 @@ static int check_acl(struct inode *inode, int mask)
                return posix_acl_permission(inode, acl, mask & ~MAY_NOT_BLOCK);
        }
 
-       acl = get_cached_acl(inode, ACL_TYPE_ACCESS);
-
-       /*
-        * A filesystem can force a ACL callback by just never filling the
-        * ACL cache. But normally you'd fill the cache either at inode
-        * instantiation time, or on the first ->get_acl call.
-        *
-        * If the filesystem doesn't have a get_acl() function at all, we'll
-        * just create the negative cache entry.
-        */
-       if (acl == ACL_NOT_CACHED) {
-               if (inode->i_op->get_acl) {
-                       acl = inode->i_op->get_acl(inode, ACL_TYPE_ACCESS);
-                       if (IS_ERR(acl))
-                               return PTR_ERR(acl);
-               } else {
-                       set_cached_acl(inode, ACL_TYPE_ACCESS, NULL);
-                       return -EAGAIN;
-               }
-       }
-
+       acl = get_acl(inode, ACL_TYPE_ACCESS);
+       if (IS_ERR(acl))
+               return PTR_ERR(acl);
        if (acl) {
                int error = posix_acl_permission(inode, acl, mask);
                posix_acl_release(acl);
@@ -3945,10 +3926,13 @@ out_dput:
        done_path_create(&new_path, new_dentry);
        if (delegated_inode) {
                error = break_deleg_wait(&delegated_inode);
-               if (!error)
+               if (!error) {
+                       path_put(&old_path);
                        goto retry;
+               }
        }
        if (retry_estale(error, how)) {
+               path_put(&old_path);
                how |= LOOKUP_REVAL;
                goto retry;
        }