diff options
author | kmacy <kmacy@FreeBSD.org> | 2009-05-30 19:26:35 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2009-05-30 19:26:35 +0000 |
commit | 9452336efa60e42bb95d12a0d309fc7e7a01681b (patch) | |
tree | 74238537a1f7bdb68a61921cfc64edd578e41b53 | |
parent | 8dccb90bbb1227d4b7ebf31ed2dfae3fec861745 (diff) | |
download | FreeBSD-src-9452336efa60e42bb95d12a0d309fc7e7a01681b.zip FreeBSD-src-9452336efa60e42bb95d12a0d309fc7e7a01681b.tar.gz |
work around snapshot shutdown race reported by Henri Hennebert
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c b/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c index d9eb88a..cd522bf 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c @@ -564,8 +564,13 @@ gfs_file_inactive(vnode_t *vp) if (fp->gfs_parent == NULL || (vp->v_flag & V_XATTRDIR)) goto found; - dp = fp->gfs_parent->v_data; - + /* + * XXX cope with a FreeBSD-specific race wherein the parent's + * snapshot data can be freed before the parent is + */ + if ((dp = fp->gfs_parent->v_data) == NULL) + return (NULL); + /* * First, see if this vnode is cached in the parent. */ |