diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-24 21:35:16 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:57:03 -0500 |
commit | 1ab597386205f8dc757cf8750465502aeae65154 (patch) | |
tree | 69a8ad9eeafe3fd358151c26002cbab6d2215f28 /fs/pnode.c | |
parent | 44d964d609c7c11b330a3d1caf30767fa13c7be3 (diff) |
vfs: spread struct mount - do_umount/propagate_mount_busy
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r-- | fs/pnode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 89ea50dc2af3..3105cca197ec 100644 --- a/fs/pnode.c +++ b/fs/pnode.c | |||
@@ -272,9 +272,9 @@ out: | |||
272 | /* | 272 | /* |
273 | * return true if the refcount is greater than count | 273 | * return true if the refcount is greater than count |
274 | */ | 274 | */ |
275 | static inline int do_refcount_check(struct vfsmount *mnt, int count) | 275 | static inline int do_refcount_check(struct mount *mnt, int count) |
276 | { | 276 | { |
277 | int mycount = mnt_get_count(mnt) - mnt->mnt_ghosts; | 277 | int mycount = mnt_get_count(&mnt->mnt) - mnt->mnt.mnt_ghosts; |
278 | return (mycount > count); | 278 | return (mycount > count); |
279 | } | 279 | } |
280 | 280 | ||
@@ -288,14 +288,14 @@ static inline int do_refcount_check(struct vfsmount *mnt, int count) | |||
288 | * | 288 | * |
289 | * vfsmount lock must be held for write | 289 | * vfsmount lock must be held for write |
290 | */ | 290 | */ |
291 | int propagate_mount_busy(struct vfsmount *mnt, int refcnt) | 291 | int propagate_mount_busy(struct mount *mnt, int refcnt) |
292 | { | 292 | { |
293 | struct vfsmount *m; | 293 | struct vfsmount *m; |
294 | struct mount *child; | 294 | struct mount *child; |
295 | struct vfsmount *parent = mnt->mnt_parent; | 295 | struct vfsmount *parent = mnt->mnt.mnt_parent; |
296 | int ret = 0; | 296 | int ret = 0; |
297 | 297 | ||
298 | if (mnt == parent) | 298 | if (&mnt->mnt == parent) |
299 | return do_refcount_check(mnt, refcnt); | 299 | return do_refcount_check(mnt, refcnt); |
300 | 300 | ||
301 | /* | 301 | /* |
@@ -303,14 +303,14 @@ int propagate_mount_busy(struct vfsmount *mnt, int refcnt) | |||
303 | * If not, we don't have to go checking for all other | 303 | * If not, we don't have to go checking for all other |
304 | * mounts | 304 | * mounts |
305 | */ | 305 | */ |
306 | if (!list_empty(&mnt->mnt_mounts) || do_refcount_check(mnt, refcnt)) | 306 | if (!list_empty(&mnt->mnt.mnt_mounts) || do_refcount_check(mnt, refcnt)) |
307 | return 1; | 307 | return 1; |
308 | 308 | ||
309 | for (m = propagation_next(parent, parent); m; | 309 | for (m = propagation_next(parent, parent); m; |
310 | m = propagation_next(m, parent)) { | 310 | m = propagation_next(m, parent)) { |
311 | child = __lookup_mnt(m, mnt->mnt_mountpoint, 0); | 311 | child = __lookup_mnt(m, mnt->mnt.mnt_mountpoint, 0); |
312 | if (child && list_empty(&child->mnt.mnt_mounts) && | 312 | if (child && list_empty(&child->mnt.mnt_mounts) && |
313 | (ret = do_refcount_check(&child->mnt, 1))) | 313 | (ret = do_refcount_check(child, 1))) |
314 | break; | 314 | break; |
315 | } | 315 | } |
316 | return ret; | 316 | return ret; |