From owner-svn-src-all@FreeBSD.ORG Sat Jul 9 15:16:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67810106564A; Sat, 9 Jul 2011 15:16:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF0D8FC08; Sat, 9 Jul 2011 15:16:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p69FG8NF005496; Sat, 9 Jul 2011 15:16:08 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p69FG8xr005493; Sat, 9 Jul 2011 15:16:08 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201107091516.p69FG8xr005493@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 9 Jul 2011 15:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223888 - in head/sys: sys ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2011 15:16:08 -0000 Author: kib Date: Sat Jul 9 15:16:07 2011 New Revision: 223888 URL: http://svn.freebsd.org/changeset/base/223888 Log: Use 'curthread_pflags' instead of 'thread_pflags' to signify that only curthread can be operated upon. Requested by: attilio MFC after: 1 week Modified: head/sys/sys/proc.h head/sys/ufs/ffs/ffs_balloc.c Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Jul 9 14:42:45 2011 (r223887) +++ head/sys/sys/proc.h Sat Jul 9 15:16:07 2011 (r223888) @@ -914,7 +914,7 @@ void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); static __inline int -thread_pflags_set(int flags) +curthread_pflags_set(int flags) { struct thread *td; int save; @@ -926,7 +926,7 @@ thread_pflags_set(int flags) } static __inline void -thread_pflags_restore(int save) +curthread_pflags_restore(int save) { curthread->td_pflags &= save; Modified: head/sys/ufs/ffs/ffs_balloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_balloc.c Sat Jul 9 14:42:45 2011 (r223887) +++ head/sys/ufs/ffs/ffs_balloc.c Sat Jul 9 15:16:07 2011 (r223888) @@ -234,7 +234,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t if (num < 1) panic ("ffs_balloc_ufs1: ufs_getlbns returned indirect block"); #endif - saved_inbdflush = thread_pflags_set(TDP_INBDFLUSH); + saved_inbdflush = curthread_pflags_set(TDP_INBDFLUSH); /* * Fetch the first indirect block allocating if necessary. */ @@ -248,7 +248,7 @@ ffs_balloc_ufs1(struct vnode *vp, off_t pref = ffs_blkpref_ufs1(ip, lbn, 0, (ufs1_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); return (error); } nb = newb; @@ -354,7 +354,7 @@ retry: * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = bp; return (0); } @@ -404,7 +404,7 @@ retry: bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); } @@ -426,11 +426,11 @@ retry: nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); fail: - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file. @@ -772,7 +772,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t if (num < 1) panic ("ffs_balloc_ufs2: ufs_getlbns returned indirect block"); #endif - saved_inbdflush = thread_pflags_set(TDP_INBDFLUSH); + saved_inbdflush = curthread_pflags_set(TDP_INBDFLUSH); /* * Fetch the first indirect block allocating if necessary. */ @@ -786,7 +786,7 @@ ffs_balloc_ufs2(struct vnode *vp, off_t pref = ffs_blkpref_ufs2(ip, lbn, 0, (ufs2_daddr_t *)0); if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, flags, cred, &newb)) != 0) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); return (error); } nb = newb; @@ -892,7 +892,7 @@ retry: * If asked only for the indirect block, then return it. */ if (flags & BA_METAONLY) { - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = bp; return (0); } @@ -942,7 +942,7 @@ retry: bp->b_flags |= B_CLUSTEROK; bdwrite(bp); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); } @@ -970,11 +970,11 @@ retry: nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); *bpp = nbp; return (0); fail: - thread_pflags_restore(saved_inbdflush); + curthread_pflags_restore(saved_inbdflush); /* * If we have failed to allocate any blocks, simply return the error. * This is the usual case and avoids the need to fsync the file.