Hi Ronnie, Ronnie Sahlberg <lsahlber@xxxxxxxxxx> writes: > +int > +smb2_is_dir(const unsigned int xid, struct cifs_tcon *tcon, > + __le16 *target_file) I think I'd feel better if the actual result was an out parameter rather than mixed with errors in the return value. > + if (rc) > + goto out; > + > + rc = !!(le32_to_cpu(smb2_data->Attributes) & FILE_ATTRIBUTE_DIRECTORY); > + > +out: > + kfree(smb2_data); > + return rc; I think this can hide EPERM (errno 1) errors. Also it's too bad we have functions taking in utf16 params and some not but that's a whole another story. I had this idea of introducing a path struct and only serialize it at the very last moment which I'll try to implement ..one day :) -- Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html