Hi Andrew,
This patch re-orders some code in expire.c:autofs4_expire_indirect()
to avoid compile warning, reported by Harvey Harrison:
CHECK fs/autofs4/expire.c
fs/autofs4/expire.c:383:2: warning: context imbalance in
'autofs4_expire_indirect' - unexpected unlock
Signed-off-by: Ian Kent <raven@themaw.net>
---
diff -up linux-2.6.25-mm1/fs/autofs4/expire.c.cleanup-expire-indirect linux-2.6.25-mm1/fs/autofs4/expire.c
--- linux-2.6.25-mm1/fs/autofs4/expire.c.cleanup-expire-indirect 2008-04-28 11:38:55.000000000 +0800
+++ linux-2.6.25-mm1/fs/autofs4/expire.c 2008-04-28 11:39:17.000000000 +0800
@@ -333,7 +333,7 @@ static struct dentry *autofs4_expire_ind
/* Can we expire this guy */
if (autofs4_can_expire(dentry, timeout, do_now)) {
expired = dentry;
- break;
+ goto found;
}
goto next;
}
@@ -352,7 +352,7 @@ static struct dentry *autofs4_expire_ind
inf->flags |= AUTOFS_INF_EXPIRING;
spin_unlock(&sbi->fs_lock);
expired = dentry;
- break;
+ goto found;
}
spin_unlock(&sbi->fs_lock);
/*
@@ -363,7 +363,7 @@ static struct dentry *autofs4_expire_ind
expired = autofs4_check_leaves(mnt, dentry, timeout, do_now);
if (expired) {
dput(dentry);
- break;
+ goto found;
}
}
next:
@@ -371,18 +371,16 @@ next:
spin_lock(&dcache_lock);
next = next->next;
}
-
- if (expired) {
- DPRINTK("returning %p %.*s",
- expired, (int)expired->d_name.len, expired->d_name.name);
- spin_lock(&dcache_lock);
- list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child);
- spin_unlock(&dcache_lock);
- return expired;
- }
spin_unlock(&dcache_lock);
-
return NULL;
+
+found:
+ DPRINTK("returning %p %.*s",
+ expired, (int)expired->d_name.len, expired->d_name.name);
+ spin_lock(&dcache_lock);
+ list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child);
+ spin_unlock(&dcache_lock);
+ return expired;
}
/* Perform an expiry operation */
--
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.27 |
| Rafael J. Wysocki | [Bug #10714] powerpc: Badness seen on 2.6.26-rc2 with lockdep enabled |
git: | |
| Peter Stahlir | Git as a filesystem |
| skimo | [PATCH 02/15] git-config: add --remote option for reading config from remote repo |
| Aaron Bentley | Re: VCS comparison table |
| Carlos Rica | Re: If you would write git from scratch now, what would you change? |
| Pavel Machek | Re: [PATCH] [Request for inclusion] Filesystem in Userspace |
| Arjan van de Ven | Re: GFS, what's remaining |
| Badari Pulavarty | Bufferheads & page-cache reference |
| Suparna Bhattacharya | Reviewing ext3 improvement patches (delalloc, mballoc, extents) |
| Richard Stallman | Real men don't attack straw men |
| Kevin | uvm_mapent_alloc: out of static map entries on 4.3 i386 |
| Brandon Lee | DELL PERC 5iR slow performance |
| Todd Pytel | IDE or SCSI virtual disks for VMWare image? |
| usb mic not detected | 2 hours ago | Applications and Utilities |
| Problem in Inserting a module | 3 hours ago | Linux kernel |
| Treason Uncloaked | 9 hours ago | Linux kernel |
| Shared swap partition | 20 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 3 days ago | Linux kernel |
