Loading fs/gfs2/inode.c +5 −15 Original line number Diff line number Diff line Loading @@ -277,8 +277,7 @@ int gfs2_dinode_dealloc(struct gfs2_inode *ip) if (error) goto out_rindex_relse; error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_STATFS + RES_QUOTA, 1); error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_STATFS + RES_QUOTA, 1); if (error) goto out_rg_gunlock; Loading Loading @@ -524,14 +523,11 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) out_brelse: brelse(bh); out_end_trans: mutex_unlock(&sdp->sd_inum_mutex); gfs2_trans_end(sdp); out: gfs2_glock_dq_uninit(&gh); return error; } Loading Loading @@ -593,8 +589,7 @@ static void munge_mode_uid_gid(struct gfs2_inode *dip, unsigned int *mode, unsigned int *uid, unsigned int *gid) { if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir && (dip->i_di.di_mode & S_ISUID) && dip->i_di.di_uid) { (dip->i_di.di_mode & S_ISUID) && dip->i_di.di_uid) { if (S_ISDIR(*mode)) *mode |= S_ISUID; else if (dip->i_di.di_uid != current->fsuid) Loading Loading @@ -634,10 +629,8 @@ static int alloc_dinode(struct gfs2_inode *dip, struct gfs2_inum *inum, out_ipreserv: gfs2_inplace_release(dip); out: gfs2_alloc_put(dip); return error; } Loading Loading @@ -1300,7 +1293,6 @@ int gfs2_glock_nq_m_atime(unsigned int num_gh, struct gfs2_holder *ghs) } kfree(p); return error; } Loading Loading @@ -1346,9 +1338,7 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr) return error; error = __gfs2_setattr_simple(ip, attr); gfs2_trans_end(GFS2_SB(&ip->i_inode)); return error; } fs/gfs2/meta_io.h +4 −19 Original line number Diff line number Diff line Loading @@ -17,35 +17,20 @@ static inline void gfs2_buffer_clear(struct buffer_head *bh) static inline void gfs2_buffer_clear_tail(struct buffer_head *bh, int head) { BUG_ON(head > bh->b_size); memset(bh->b_data + head, 0, bh->b_size - head); } static inline void gfs2_buffer_clear_ends(struct buffer_head *bh, int offset, int amount, int journaled) { int z_off1 = (journaled) ? sizeof(struct gfs2_meta_header) : 0; int z_len1 = offset - z_off1; int z_off2 = offset + amount; int z_len2 = (bh)->b_size - z_off2; if (z_len1) memset(bh->b_data + z_off1, 0, z_len1); if (z_len2) memset(bh->b_data + z_off2, 0, z_len2); } static inline void gfs2_buffer_copy_tail(struct buffer_head *to_bh, int to_head, struct buffer_head *from_bh, int from_head) { memcpy(to_bh->b_data + to_head, from_bh->b_data + from_head, BUG_ON(from_head < to_head); memcpy(to_bh->b_data + to_head, from_bh->b_data + from_head, from_bh->b_size - from_head); memset(to_bh->b_data + to_bh->b_size + to_head - from_head, 0, from_head - to_head); 0, from_head - to_head); } struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp); Loading fs/gfs2/ops_file.c +3 −6 Original line number Diff line number Diff line Loading @@ -599,11 +599,9 @@ static int gfs2_open(struct inode *inode, struct file *file) fail_gunlock: gfs2_glock_dq_uninit(&i_gh); fail: file->private_data = NULL; kfree(fp); return error; } Loading Loading @@ -738,7 +736,6 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) out: mutex_unlock(&fp->f_fl_mutex); return error; } Loading Loading
fs/gfs2/inode.c +5 −15 Original line number Diff line number Diff line Loading @@ -277,8 +277,7 @@ int gfs2_dinode_dealloc(struct gfs2_inode *ip) if (error) goto out_rindex_relse; error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_STATFS + RES_QUOTA, 1); error = gfs2_trans_begin(sdp, RES_RG_BIT + RES_STATFS + RES_QUOTA, 1); if (error) goto out_rg_gunlock; Loading Loading @@ -524,14 +523,11 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, uint64_t *formal_ino) out_brelse: brelse(bh); out_end_trans: mutex_unlock(&sdp->sd_inum_mutex); gfs2_trans_end(sdp); out: gfs2_glock_dq_uninit(&gh); return error; } Loading Loading @@ -593,8 +589,7 @@ static void munge_mode_uid_gid(struct gfs2_inode *dip, unsigned int *mode, unsigned int *uid, unsigned int *gid) { if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir && (dip->i_di.di_mode & S_ISUID) && dip->i_di.di_uid) { (dip->i_di.di_mode & S_ISUID) && dip->i_di.di_uid) { if (S_ISDIR(*mode)) *mode |= S_ISUID; else if (dip->i_di.di_uid != current->fsuid) Loading Loading @@ -634,10 +629,8 @@ static int alloc_dinode(struct gfs2_inode *dip, struct gfs2_inum *inum, out_ipreserv: gfs2_inplace_release(dip); out: gfs2_alloc_put(dip); return error; } Loading Loading @@ -1300,7 +1293,6 @@ int gfs2_glock_nq_m_atime(unsigned int num_gh, struct gfs2_holder *ghs) } kfree(p); return error; } Loading Loading @@ -1346,9 +1338,7 @@ int gfs2_setattr_simple(struct gfs2_inode *ip, struct iattr *attr) return error; error = __gfs2_setattr_simple(ip, attr); gfs2_trans_end(GFS2_SB(&ip->i_inode)); return error; }
fs/gfs2/meta_io.h +4 −19 Original line number Diff line number Diff line Loading @@ -17,35 +17,20 @@ static inline void gfs2_buffer_clear(struct buffer_head *bh) static inline void gfs2_buffer_clear_tail(struct buffer_head *bh, int head) { BUG_ON(head > bh->b_size); memset(bh->b_data + head, 0, bh->b_size - head); } static inline void gfs2_buffer_clear_ends(struct buffer_head *bh, int offset, int amount, int journaled) { int z_off1 = (journaled) ? sizeof(struct gfs2_meta_header) : 0; int z_len1 = offset - z_off1; int z_off2 = offset + amount; int z_len2 = (bh)->b_size - z_off2; if (z_len1) memset(bh->b_data + z_off1, 0, z_len1); if (z_len2) memset(bh->b_data + z_off2, 0, z_len2); } static inline void gfs2_buffer_copy_tail(struct buffer_head *to_bh, int to_head, struct buffer_head *from_bh, int from_head) { memcpy(to_bh->b_data + to_head, from_bh->b_data + from_head, BUG_ON(from_head < to_head); memcpy(to_bh->b_data + to_head, from_bh->b_data + from_head, from_bh->b_size - from_head); memset(to_bh->b_data + to_bh->b_size + to_head - from_head, 0, from_head - to_head); 0, from_head - to_head); } struct inode *gfs2_aspace_get(struct gfs2_sbd *sdp); Loading
fs/gfs2/ops_file.c +3 −6 Original line number Diff line number Diff line Loading @@ -599,11 +599,9 @@ static int gfs2_open(struct inode *inode, struct file *file) fail_gunlock: gfs2_glock_dq_uninit(&i_gh); fail: file->private_data = NULL; kfree(fp); return error; } Loading Loading @@ -738,7 +736,6 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) out: mutex_unlock(&fp->f_fl_mutex); return error; } Loading