From f4a0a7e7fa7dd6fadbb1378045f6af0cc3faf4c9 Mon Sep 17 00:00:00 2001 From: "Venkateswararao Jujjuri (JV)" Date: Thu, 13 Jan 2011 16:33:00 -0800 Subject: [PATCH] --- yaml --- r: 235006 b: refs/heads/master c: d344b0fb72e00339625464c5a29711906fa70b8b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/9p/acl.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 7dd52cc64a67..6b073d57e1f1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c61fa0d6d9d466356ffa89fa1c1a9a1cd726fab4 +refs/heads/master: d344b0fb72e00339625464c5a29711906fa70b8b diff --git a/trunk/fs/9p/acl.c b/trunk/fs/9p/acl.c index 291ff7be27f6..0a2e480477a5 100644 --- a/trunk/fs/9p/acl.c +++ b/trunk/fs/9p/acl.c @@ -132,6 +132,10 @@ static int v9fs_set_acl(struct dentry *dentry, int type, struct posix_acl *acl) struct inode *inode = dentry->d_inode; set_cached_acl(inode, type, acl); + + if (!acl) + return 0; + /* Set a setxattr request to server */ size = posix_acl_xattr_size(acl->a_count); buffer = kmalloc(size, GFP_KERNEL); @@ -181,10 +185,8 @@ int v9fs_acl_chmod(struct dentry *dentry) int v9fs_set_create_acl(struct dentry *dentry, struct posix_acl *dpacl, struct posix_acl *pacl) { - if (dpacl) - v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, dpacl); - if (pacl) - v9fs_set_acl(dentry, ACL_TYPE_ACCESS, pacl); + v9fs_set_acl(dentry, ACL_TYPE_DEFAULT, dpacl); + v9fs_set_acl(dentry, ACL_TYPE_ACCESS, pacl); posix_acl_release(dpacl); posix_acl_release(pacl); return 0;