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

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/10/sys/ufs/ffs/ffs_balloc.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ufs/ffs/ffs_balloc.c
==============================================================================
--- stable/10/sys/ufs/ffs/ffs_balloc.c  Tue Aug 23 07:51:00 2016        
(r304667)
+++ stable/10/sys/ufs/ffs/ffs_balloc.c  Tue Aug 23 07:52:07 2016        
(r304668)
@@ -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);
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to