On Thursday 20 January 2011 2:29:54 pm Stefan Hajnoczi wrote: > On Tue, Jan 18, 2011 at 01:54:16PM +0530, M. Mohan Kumar wrote:
> > - if (lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid) < 0) { > > - /* > > - * If we fail to change ownership and if we are > > - * using security model none. Ignore the error > > - */ > > - if (fs_ctx->fs_sm != SM_NONE) { > > - return -1; > > - } > > - } > > + retval = lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid); > > > > return 0; > > > > } > > retval is unused. > That was used to disable the warning message "error: ignoring return value of ‘lchown’, declared with attribute warn_unused_result" Otherwise I have to use if (lchown(rpath(fs_ctx, path), credp->fc_uid, credp->fc_gid)) { ; } > Can multiple virtio-9p requests execute at a time? chmod() and lchown() > after creation is a race condition if other requests can execute > concurrently. > We can't implement file creation with requested user credentials and permission bits in the none security model atomically. Its expected behaviour only ---- M. Mohan Kumar