diff options
Diffstat (limited to 'fs/orangefs')
-rw-r--r-- | fs/orangefs/acl.c | 4 | ||||
-rw-r--r-- | fs/orangefs/inode.c | 8 | ||||
-rw-r--r-- | fs/orangefs/namei.c | 8 | ||||
-rw-r--r-- | fs/orangefs/orangefs-sysfs.c | 2 |
4 files changed, 15 insertions, 7 deletions
diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c index 10587413b20e..72d2ff17d27b 100644 --- a/fs/orangefs/acl.c +++ b/fs/orangefs/acl.c @@ -167,12 +167,16 @@ int orangefs_init_acl(struct inode *inode, struct inode *dir) error = __orangefs_set_acl(inode, default_acl, ACL_TYPE_DEFAULT); posix_acl_release(default_acl); + } else { + inode->i_default_acl = NULL; } if (acl) { if (!error) error = __orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS); posix_acl_release(acl); + } else { + inode->i_acl = NULL; } /* If mode of the inode was changed, then do a forcible ->setattr */ diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 136a8bdc1d91..fe53381b26b1 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -405,7 +405,11 @@ struct inode *orangefs_iget(struct super_block *sb, orangefs_test_inode, orangefs_set_inode, ref); - if (!inode || !(inode->i_state & I_NEW)) + + if (!inode) + return ERR_PTR(-ENOMEM); + + if (!(inode->i_state & I_NEW)) return inode; error = orangefs_inode_getattr(inode, 1, 1, STATX_ALL); @@ -448,7 +452,7 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir, inode = new_inode(sb); if (!inode) - return NULL; + return ERR_PTR(-ENOMEM); orangefs_set_inode(inode, ref); inode->i_ino = hash; /* needed for stat etc */ diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c index 625b0580f9be..c8676c996249 100644 --- a/fs/orangefs/namei.c +++ b/fs/orangefs/namei.c @@ -58,7 +58,6 @@ static int orangefs_create(struct inode *dir, goto out; ref = new_op->downcall.resp.create.refn; - op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); if (IS_ERR(inode)) { @@ -92,6 +91,7 @@ static int orangefs_create(struct inode *dir, mark_inode_dirty_sync(dir); ret = 0; out: + op_release(new_op); gossip_debug(GOSSIP_NAME_DEBUG, "%s: %pd: returning %d\n", __func__, @@ -157,7 +157,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry, new_op->downcall.resp.lookup.refn.fs_id, ret); - if (ret >= 0) { + if (ret == 0) { orangefs_set_timeout(dentry); inode = orangefs_iget(dir->i_sb, &new_op->downcall.resp.lookup.refn); } else if (ret == -ENOENT) { @@ -269,7 +269,6 @@ static int orangefs_symlink(struct inode *dir, } ref = new_op->downcall.resp.sym.refn; - op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); if (IS_ERR(inode)) { @@ -307,6 +306,7 @@ static int orangefs_symlink(struct inode *dir, mark_inode_dirty_sync(dir); ret = 0; out: + op_release(new_op); return ret; } @@ -346,7 +346,6 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode } ref = new_op->downcall.resp.mkdir.refn; - op_release(new_op); inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); if (IS_ERR(inode)) { @@ -379,6 +378,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode orangefs_inode_setattr(dir, &iattr); mark_inode_dirty_sync(dir); out: + op_release(new_op); return ret; } diff --git a/fs/orangefs/orangefs-sysfs.c b/fs/orangefs/orangefs-sysfs.c index dd28079f518c..19739aaee675 100644 --- a/fs/orangefs/orangefs-sysfs.c +++ b/fs/orangefs/orangefs-sysfs.c @@ -323,7 +323,7 @@ static ssize_t sysfs_service_op_show(struct kobject *kobj, /* Can't do a service_operation if the client is not running... */ rc = is_daemon_in_service(); if (rc) { - pr_info("%s: Client not running :%d:\n", + pr_info_ratelimited("%s: Client not running :%d:\n", __func__, is_daemon_in_service()); goto out; |