[linux-cifs-client] Re: setattr inode.c patch series

Jeff Layton jlayton at redhat.com
Wed Aug 6 11:01:28 GMT 2008


On Tue, 5 Aug 2008 23:34:32 -0500
"Steve French" <smfrench at gmail.com> wrote:

> In merging your patch
> 
> " Rename CIFSSMBSetFileTimes to CIFSSMBSetFileInfo and add PID arg"
> 
> "The new name is more clear since this is also used to set file
> attributes. We'll need the pid_of_opener arg so that we can
> pass in filehandles of other pids and spare ourselves an open
> call."
> 
> I noticed that you changed the calling convention - and adding pid
> of opener as a parm - but you aren't using the pid of the opener
> fs/cifs/misc.c already set it as follows:
> 
>         buffer->Pid = cpu_to_le16((__u16)current->tgid);
>         buffer->PidHigh = cpu_to_le16((__u16)(current->tgid >> 16));
> 
> 

I'm not sure I understand the question...

small_smb_init calls header_assemble, which  sets Pid + PidHigh to
the tgid.

That patch makes CIFSSMBSetFileInfo then overwrite those values with
the pid_of_opener value. The existing callers of CIFSSMBSetFileTimes
are then converted to pass in pid_of_opener == tgid to the newly
renamed function. Eventually, this patch:

    move file time and dos attribute setting logic into new function

...calls the new function with open_file->pid as the arg if an
existing open file is found.

-- 
Jeff Layton <jlayton at redhat.com>


More information about the linux-cifs-client mailing list