Date: Fri, 14 May 2010 01:35:38 GMT From: Zheng Liu <lz@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 178230 for review Message-ID: <201005140135.o4E1ZcdO010666@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@178230?ac=10 Change 178230 by lz@gnehzuil-freebsd on 2010/05/14 01:35:16 Initialize inode rsv lock. Affected files ... .. //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_vfsops.c#4 edit Differences ... ==== //depot/projects/soc2010/extfs/src/sys/fs/ext2fs/ext2_vfsops.c#4 (text+ko) ==== @@ -582,10 +582,10 @@ goto out; /* Initial reservation window index and lock */ - bzero(&ump->um_e2fs->e2fs_rsv_win_lock, sizeof(struct mtx)); - mtx_init(&ump->um_e2fs->e2fs_rsv_win_lock, - "reservation window lock", NULL, MTX_SPIN); - RB_INIT(&ump->um_e2fs->e2fs_tree); + bzero(&ump->um_e2fs->e2fs_rsv_lock, sizeof(struct mtx)); + mtx_init(&ump->um_e2fs->e2fs_rsv_lock, + "rsv tree lock", NULL, MTX_SPIN); + RB_INIT(&ump->um_e2fs->e2fs_rsv_tree); brelse(bp); bp = NULL; @@ -686,7 +686,7 @@ g_topology_unlock(); PICKUP_GIANT(); vrele(ump->um_devvp); - mtx_destroy(&fs->e2fs_rsv_win_lock); + mtx_destroy(&fs->e2fs_rsv_lock); free(fs->e2fs_gd, M_EXT2MNT); free(fs->e2fs_contigdirs, M_EXT2MNT); free(fs->e2fs, M_EXT2MNT); @@ -891,8 +891,11 @@ ip->i_e2fs = fs = ump->um_e2fs; ip->i_ump = ump; ip->i_number = ino; + /* lazily initialize reservation window */ - ip->i_rsv_winp = NULL; + bzero(&ip->i_rsv_lock, sizeof(struct mtx)); + mtx_init(&ip->i_rsv_lock, "inode rsv lock", NULL, MTX_DEF); + ip->i_rsv = NULL; lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); error = insmntque(vp, mp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005140135.o4E1ZcdO010666>