]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[GFS2] Remove gfs2_check_acl()
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 29 Nov 2006 15:41:49 +0000 (10:41 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 30 Nov 2006 15:37:32 +0000 (10:37 -0500)
As pointed out by Adrian Bunk, the gfs2_check_acl() function is no
longer used. This patch removes it and renamed gfs2_check_acl_locked()
to gfs2_check_acl() since we only need one variant of that function now.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Adrian Bunk <bunk@stusta.de>
fs/gfs2/acl.c
fs/gfs2/acl.h
fs/gfs2/ops_inode.c

index 3908992b27a2c7502352b8433be7ed5c5db37f65..6e80844367ee9b5edd81143bc659ab14834809a5 100644 (file)
@@ -145,14 +145,14 @@ out:
 }
 
 /**
- * gfs2_check_acl_locked - Check an ACL to see if we're allowed to do something
+ * gfs2_check_acl - Check an ACL to see if we're allowed to do something
  * @inode: the file we want to do something to
  * @mask: what we want to do
  *
  * Returns: errno
  */
 
-int gfs2_check_acl_locked(struct inode *inode, int mask)
+int gfs2_check_acl(struct inode *inode, int mask)
 {
        struct posix_acl *acl = NULL;
        int error;
@@ -170,21 +170,6 @@ int gfs2_check_acl_locked(struct inode *inode, int mask)
        return -EAGAIN;
 }
 
-int gfs2_check_acl(struct inode *inode, int mask)
-{
-       struct gfs2_inode *ip = GFS2_I(inode);
-       struct gfs2_holder i_gh;
-       int error;
-
-       error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
-       if (!error) {
-               error = gfs2_check_acl_locked(inode, mask);
-               gfs2_glock_dq_uninit(&i_gh);
-       }
-
-       return error;
-}
-
 static int munge_mode(struct gfs2_inode *ip, mode_t mode)
 {
        struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
index 05c294fe0d780f9c28a4cef0d8ebdcfa2a5deffc..6751930bfb648e809eb90e028c0caa8458e1e5e8 100644 (file)
@@ -31,7 +31,6 @@ int gfs2_acl_validate_set(struct gfs2_inode *ip, int access,
                          struct gfs2_ea_request *er,
                          int *remove, mode_t *mode);
 int gfs2_acl_validate_remove(struct gfs2_inode *ip, int access);
-int gfs2_check_acl_locked(struct inode *inode, int mask);
 int gfs2_check_acl(struct inode *inode, int mask);
 int gfs2_acl_create(struct gfs2_inode *dip, struct gfs2_inode *ip);
 int gfs2_acl_chmod(struct gfs2_inode *ip, struct iattr *attr);
index fbe38c1ab54e9c5d9656430b7638bdbd7f6b9c1f..636dda4c7d38d688c76923c6289e130e8d4754ac 100644 (file)
@@ -856,7 +856,7 @@ static int gfs2_permission(struct inode *inode, int mask, struct nameidata *nd)
                unlock = 1;
        }
 
-       error = generic_permission(inode, mask, gfs2_check_acl_locked);
+       error = generic_permission(inode, mask, gfs2_check_acl);
        if (unlock)
                gfs2_glock_dq_uninit(&i_gh);