lkml.org 
[lkml]   [2006]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 11/20] elevate write count over calls to vfs_rename()
On Fri, Jun 16, 2006 at 04:12:21PM -0700, Dave Hansen wrote:
> + err = mnt_want_write(ffhp->fh_export->ex_mnt);
> + if (err)
> + goto out_dput_new;
> +
> + err = mnt_want_write(tfhp->fh_export->ex_mnt);
> + if (err)
> + goto out_mnt_drop_write_old;
> +
> err = vfs_rename(fdir, odentry, tdir, ndentry);
> if (!err && EX_ISSYNC(tfhp->fh_export)) {
> err = nfsd_sync_dir(tdentry);
> if (!err)
> err = nfsd_sync_dir(fdentry);
> }
> -
> + mnt_drop_write(tfhp->fh_export->ex_mnt);
> + out_mnt_drop_write_old:
> + mnt_drop_write(ffhp->fh_export->ex_mnt);

Ahem...
a) nfsd_rename() should check that tfhp->fh_export->ex_mnt ==
ffhp->fh_export->ex_mnt (if not that tfhp->fh_export == ffhp->fh_export)
instead of comparing ->i_sb
b) that patch should do mnt_want_write() only once.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-18 20:26    [W:0.315 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site