mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 14:41:02 +07:00
This time we have mostly clean ups. There is a bug fix for a NULL dereference
relating to ACLs, and another which improves (but does not fix entirely) an allocation fall-back code path. The other three patches are small clean ups. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAABAgAGBQJU2dvJAAoJEMrg3m4a/8jSQJYQAKJXz9l0MDHPpm4qcjEO1p8T JLSEa8X24taugcbSavC15g0v3HOCveleMymNo2wrfTFqkcpy/YTlqj0LjZywXOZc KJMZWL4ZYZXmdf2DDhZ6WFb6Ouw+0l2MbtIWb/L2NQiv1K6nSdOVsgXiRvyehvxD YEQBbdQxsa8uFr1QbBVNvaM6X6iHOLLvkLHHpw84N1dMcijt3BjQqqXQphkD6aM8 uSEYSY4aMl2nZv/fEItjqLqLZvkhQX/dbN5aUnixHd65bSYkdsWMjn4DInJujbNd aT/iLNFhCKN3FqAcl+FAfnOhanJsj0jDSS4puyufuLOv2vgK9AmF8TiAW4TEZ0ny IAqdurn7+1dAINxKTuo/ktBdkdwWI35cwP3PUrvKJifgKxX/EvmGDC3U2EoeItP1 /TbwE2PVdQspCiXUGIAx40BhmEEszrQHIdM+p+cUxxmmt74Hm9582pby1aMOPnHQ FZoPhtFRKD8JttxRu+MyEwC4K0/JRK7R496fFPoY225+DSqeNibXrhU3USznZXYc 0h2kRoXTMO74ptdZr+I91RKUWZo17Ujm96mRZgnCSGgEX3IwD/6dxgd0cjU7075r mSVEy6fngwM6cGF0qQsnqhf2bktCPg+8zhSilbxwuFfWIa66NUjoupqB3wzpdlyC sd+3tpZijhStqjPYTKmM =CiRw -----END PGP SIGNATURE----- Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw Pull gfs2 updates from Steven Whitehouse: "This time we have mostly clean ups. There is a bug fix for a NULL dereference relating to ACLs, and another which improves (but does not fix entirely) an allocation fall-back code path. The other three patches are small clean ups" * tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw: GFS2: Fix crash during ACL deletion in acl max entry check in gfs2_set_acl() GFS2: use __vmalloc GFP_NOFS for fs-related allocations. GFS2: Eliminate a nonsense goto GFS2: fix sprintf format specifier GFS2: Eliminate __gfs2_glock_remove_from_lru
This commit is contained in:
commit
b2718bffb4
@ -73,7 +73,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
|
||||
|
||||
BUG_ON(name == NULL);
|
||||
|
||||
if (acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
|
||||
if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
|
||||
return -E2BIG;
|
||||
|
||||
if (type == ACL_TYPE_ACCESS) {
|
||||
|
@ -1896,7 +1896,8 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
|
||||
|
||||
ht = kzalloc(size, GFP_NOFS | __GFP_NOWARN);
|
||||
if (ht == NULL)
|
||||
ht = vzalloc(size);
|
||||
ht = __vmalloc(size, GFP_NOFS | __GFP_NOWARN | __GFP_ZERO,
|
||||
PAGE_KERNEL);
|
||||
if (!ht)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -173,19 +173,14 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl)
|
||||
spin_unlock(&lru_lock);
|
||||
}
|
||||
|
||||
static void __gfs2_glock_remove_from_lru(struct gfs2_glock *gl)
|
||||
static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl)
|
||||
{
|
||||
spin_lock(&lru_lock);
|
||||
if (!list_empty(&gl->gl_lru)) {
|
||||
list_del_init(&gl->gl_lru);
|
||||
atomic_dec(&lru_count);
|
||||
clear_bit(GLF_LRU, &gl->gl_flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl)
|
||||
{
|
||||
spin_lock(&lru_lock);
|
||||
__gfs2_glock_remove_from_lru(gl);
|
||||
spin_unlock(&lru_lock);
|
||||
}
|
||||
|
||||
@ -205,9 +200,7 @@ void gfs2_glock_put(struct gfs2_glock *gl)
|
||||
|
||||
lockref_mark_dead(&gl->gl_lockref);
|
||||
|
||||
spin_lock(&lru_lock);
|
||||
__gfs2_glock_remove_from_lru(gl);
|
||||
spin_unlock(&lru_lock);
|
||||
gfs2_glock_remove_from_lru(gl);
|
||||
spin_unlock(&gl->gl_lockref.lock);
|
||||
spin_lock_bucket(gl->gl_hash);
|
||||
hlist_bl_del_rcu(&gl->gl_list);
|
||||
|
@ -543,10 +543,7 @@ static int link_dinode(struct gfs2_inode *dip, const struct qstr *name,
|
||||
}
|
||||
|
||||
error = gfs2_dir_add(&dip->i_inode, name, ip, da);
|
||||
if (error)
|
||||
goto fail_end_trans;
|
||||
|
||||
fail_end_trans:
|
||||
gfs2_trans_end(sdp);
|
||||
fail_ipreserv:
|
||||
gfs2_inplace_release(dip);
|
||||
|
@ -439,7 +439,7 @@ static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid,
|
||||
|
||||
ls->ls_recover_jid_done = jid;
|
||||
ls->ls_recover_jid_status = message;
|
||||
sprintf(env_jid, "JID=%d", jid);
|
||||
sprintf(env_jid, "JID=%u", jid);
|
||||
sprintf(env_status, "RECOVERY=%s",
|
||||
message == LM_RD_SUCCESS ? "Done" : "Failed");
|
||||
kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp);
|
||||
|
@ -96,7 +96,7 @@ static ssize_t freeze_show(struct gfs2_sbd *sdp, char *buf)
|
||||
struct super_block *sb = sdp->sd_vfs;
|
||||
int frozen = (sb->s_writers.frozen == SB_UNFROZEN) ? 0 : 1;
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", frozen);
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", frozen);
|
||||
}
|
||||
|
||||
static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
|
||||
|
Loading…
Reference in New Issue
Block a user