From e8d4ceeb34a58d47cc031ec023d61198ec8c4a80 Mon Sep 17 00:00:00 2001 From: Chengguang Xu Date: Fri, 31 Aug 2018 22:33:51 +0800 Subject: jfs: cache NULL when both default_acl and acl are NULL default_acl and acl of newly created inode will be initiated as ACL_NOT_CACHED in vfs function inode_init_always() and later will be updated by calling xxx_init_acl() in specific filesystems. Howerver, when default_acl and acl are NULL then they keep the value of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl in this case. Signed-off-by: Chengguang Xu Signed-off-by: Dave Kleikamp --- fs/jfs/acl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs') diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 2e71b6e7e646..8c06a6ea862d 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c @@ -146,12 +146,16 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir) if (default_acl) { rc = __jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, default_acl); posix_acl_release(default_acl); + } else { + inode->i_default_acl = NULL; } if (acl) { if (!rc) rc = __jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl); posix_acl_release(acl); + } else { + inode->i_acl = NULL; } JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) | -- cgit v1.2.3-59-g8ed1b From 02645bcdfcc2d51f79d87ad346f07ef64ad1ea55 Mon Sep 17 00:00:00 2001 From: Chengguang Xu Date: Sun, 9 Sep 2018 18:15:56 +0800 Subject: jfs: remove quota option from ignore list We treat quota option as usrquota, so remove quota option from ignore list. Signed-off-by: Chengguang Xu Signed-off-by: Dave Kleikamp --- fs/jfs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 09da5cf14e27..65d8fc87ab11 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -247,7 +247,7 @@ static const match_table_t tokens = { {Opt_resize_nosize, "resize"}, {Opt_errors, "errors=%s"}, {Opt_ignore, "noquota"}, - {Opt_ignore, "quota"}, + {Opt_quota, "quota"}, {Opt_usrquota, "usrquota"}, {Opt_grpquota, "grpquota"}, {Opt_uid, "uid=%u"}, -- cgit v1.2.3-59-g8ed1b From 1390643d1d5c539be4d7031a0c507565cb1168a0 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Mon, 17 Sep 2018 15:12:21 +0800 Subject: jfs: remove redundant dquot_initialize() in jfs_evict_inode() We don't need to call dquot_initialize() twice in jfs_evict_inode(), remove one of them for cleanup. Signed-off-by: Chao Yu Signed-off-by: Dave Kleikamp --- fs/jfs/inode.c | 1 - 1 file changed, 1 deletion(-) (limited to 'fs') diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 054cc761b426..805ae9e8944a 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -166,7 +166,6 @@ void jfs_evict_inode(struct inode *inode) /* * Free the inode from the quota allocation. */ - dquot_initialize(inode); dquot_free_inode(inode); } } else { -- cgit v1.2.3-59-g8ed1b