From 87af175b42abaeda887920de34964761bda225b5 Mon Sep 17 00:00:00 2001 From: rread Date: Fri, 30 Aug 2002 22:13:22 +0000 Subject: [PATCH] - saw a problem with the order of how filter was initialized vs. the error handling code. --- lustre/obdfilter/filter.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 1dfa901..a7dd576 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -381,13 +381,12 @@ static int filter_setup(struct obd_device *obddev, obd_count len, void *buf) GOTO(err_dec, err); filter = &obddev->u.filter;; + filter->fo_vfsmnt = mnt; + filter->fo_fstype = strdup(data->ioc_inlbuf2); filter->fo_sb = mnt->mnt_root->d_inode->i_sb; /* XXX is this even possible if do_kern_mount succeeded? */ if (!filter->fo_sb) - GOTO(err_put, err = -ENODEV); - - filter->fo_vfsmnt = mnt; - filter->fo_fstype = strdup(data->ioc_inlbuf2); + GOTO(err_kfree, err = -ENODEV); OBD_SET_CTXT_MAGIC(&filter->fo_ctxt); filter->fo_ctxt.pwdmnt = mnt; @@ -408,7 +407,6 @@ static int filter_setup(struct obd_device *obddev, obd_count len, void *buf) err_kfree: kfree(filter->fo_fstype); -err_put: unlock_kernel(); mntput(filter->fo_vfsmnt); filter->fo_sb = 0; -- 1.8.3.1