From: rread Date: Fri, 30 Aug 2002 22:13:22 +0000 (+0000) Subject: - saw a problem with the order of how filter was initialized vs. the error X-Git-Tag: 0.5.5~1 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=87af175b42abaeda887920de34964761bda225b5;p=fs%2Flustre-release.git - saw a problem with the order of how filter was initialized vs. the error handling code. --- 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;