svn commit: r304663 - stable/11/sys/ufs/ffs

Konstantin Belousov kib at FreeBSD.org
Tue Aug 23 07:25:40 UTC 2016


Author: kib
Date: Tue Aug 23 07:25:39 2016
New Revision: 304663
URL: https://svnweb.freebsd.org/changeset/base/304663

Log:
  MFC r304228:
  When block allocation fails in UFS_BALLOC(), and the volume does not
  have SU enabled, there is no point in calling softdep_request_cleanup().

Modified:
  stable/11/sys/ufs/ffs/ffs_balloc.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ufs/ffs/ffs_balloc.c
==============================================================================
--- stable/11/sys/ufs/ffs/ffs_balloc.c	Tue Aug 23 07:23:50 2016	(r304662)
+++ stable/11/sys/ufs/ffs/ffs_balloc.c	Tue Aug 23 07:25:39 2016	(r304663)
@@ -311,7 +311,7 @@ retry:
 		if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
 		    flags | IO_BUFLOCKED, cred, &newb)) != 0) {
 			brelse(bp);
-			if (++reclaimed == 1) {
+			if (DOINGSOFTDEP(vp) && ++reclaimed == 1) {
 				UFS_LOCK(ump);
 				softdep_request_cleanup(fs, vp, cred,
 				    FLUSH_BLOCKS_WAIT);
@@ -390,7 +390,7 @@ retry:
 		    flags | IO_BUFLOCKED, cred, &newb);
 		if (error) {
 			brelse(bp);
-			if (++reclaimed == 1) {
+			if (DOINGSOFTDEP(vp) && ++reclaimed == 1) {
 				UFS_LOCK(ump);
 				softdep_request_cleanup(fs, vp, cred,
 				    FLUSH_BLOCKS_WAIT);
@@ -881,7 +881,7 @@ retry:
 		if ((error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
 		    flags | IO_BUFLOCKED, cred, &newb)) != 0) {
 			brelse(bp);
-			if (++reclaimed == 1) {
+			if (DOINGSOFTDEP(vp) && ++reclaimed == 1) {
 				UFS_LOCK(ump);
 				softdep_request_cleanup(fs, vp, cred,
 				    FLUSH_BLOCKS_WAIT);
@@ -961,7 +961,7 @@ retry:
 		    flags | IO_BUFLOCKED, cred, &newb);
 		if (error) {
 			brelse(bp);
-			if (++reclaimed == 1) {
+			if (DOINGSOFTDEP(vp) && ++reclaimed == 1) {
 				UFS_LOCK(ump);
 				softdep_request_cleanup(fs, vp, cred,
 				    FLUSH_BLOCKS_WAIT);


More information about the svn-src-all mailing list