aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2006-02-06 10:15:27 +0000
committerJeff Roberson <jeff@FreeBSD.org>2006-02-06 10:15:27 +0000
commit2f0bca553a3474e3ecc02b7e05eb3b4af8039895 (patch)
treec19d74eaa247a44cddc34c233a35de9994cbf8c8 /sys/kern/vfs_extattr.c
parentb73f64c48435beae7d38c70bde9c7ab0e8b033e0 (diff)
downloadsrc-2f0bca553a3474e3ecc02b7e05eb3b4af8039895.tar.gz
src-2f0bca553a3474e3ecc02b7e05eb3b4af8039895.zip
- Don't check v_mount for NULL to determine if a vnode has been recycled.
Use the more appropriate VI_DOOMED flag instead. Sponsored by: Isilon Systems, Inc. MFC After: 1 week
Notes
Notes: svn path=/head/; revision=155385
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 035ba9223816..dcd36960f8fd 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -318,14 +318,16 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf)
struct file *fp;
struct mount *mp;
struct statfs *sp, sb;
+ struct vnode *vp;
int error;
error = getvnode(td->td_proc->p_fd, fd, &fp);
if (error)
return (error);
- mp = fp->f_vnode->v_mount;
+ vp = fp->f_vnode;
+ mp = vp->v_mount;
fdrop(fp, td);
- if (mp == NULL)
+ if (vp->v_iflag & VI_DOOMED)
return (EBADF);
mtx_lock(&Giant);
#ifdef MAC