]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
gfs2: Clean up gfs2_alloc_parms initializers
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 20 Oct 2023 20:02:04 +0000 (22:02 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 2 Nov 2023 19:10:00 +0000 (20:10 +0100)
When intializing a struct, all fields that are not explicitly mentioned
are zeroed out already.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/file.c
fs/gfs2/quota.c

index 5bc103b031e291495bf9b83ae4f3bc56f27a5f8a..4b66efc1a82aa1c1a58fe04733f81f02d69dbe44 100644 (file)
@@ -418,7 +418,7 @@ static vm_fault_t gfs2_page_mkwrite(struct vm_fault *vmf)
        struct inode *inode = file_inode(vmf->vma->vm_file);
        struct gfs2_inode *ip = GFS2_I(inode);
        struct gfs2_sbd *sdp = GFS2_SB(inode);
-       struct gfs2_alloc_parms ap = { .aflags = 0, };
+       struct gfs2_alloc_parms ap = {};
        u64 offset = page_offset(page);
        unsigned int data_blocks, ind_blocks, rblocks;
        vm_fault_t ret = VM_FAULT_LOCKED;
@@ -1251,7 +1251,7 @@ static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t
        struct inode *inode = file_inode(file);
        struct gfs2_sbd *sdp = GFS2_SB(inode);
        struct gfs2_inode *ip = GFS2_I(inode);
-       struct gfs2_alloc_parms ap = { .aflags = 0, };
+       struct gfs2_alloc_parms ap = {};
        unsigned int data_blocks = 0, ind_blocks = 0, rblocks;
        loff_t bytes, max_bytes, max_blks;
        int error;
index d0d01d4856215f11563ac6fd55c34201ef794413..27f14ef4d346ad1a8f47b5abfd5b6435ac81243d 100644 (file)
@@ -909,7 +909,7 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda)
 {
        struct gfs2_sbd *sdp = (*qda)->qd_sbd;
        struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
-       struct gfs2_alloc_parms ap = { .aflags = 0, };
+       struct gfs2_alloc_parms ap = {};
        unsigned int data_blocks, ind_blocks;
        struct gfs2_holder *ghs, i_gh;
        unsigned int qx, x;
@@ -1741,7 +1741,7 @@ static int gfs2_set_dqblk(struct super_block *sb, struct kqid qid,
        if (gfs2_is_stuffed(ip))
                alloc_required = 1;
        if (alloc_required) {
-               struct gfs2_alloc_parms ap = { .aflags = 0, };
+               struct gfs2_alloc_parms ap = {};
                gfs2_write_calc_reserv(ip, sizeof(struct gfs2_quota),
                                       &data_blocks, &ind_blocks);
                blocks = 1 + data_blocks + ind_blocks;