From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Layton Subject: Re: [PATCH 2/4] cifs: use common code for turning off ATTR_READONLY in cifs_unlink Date: Tue, 16 Sep 2008 19:52:17 -0400 Message-ID: <20080916195217.2431ae1c@tleilax.poochiereds.net> References: <1221588319-7887-1-git-send-email-jlayton@redhat.com> <1221588319-7887-3-git-send-email-jlayton@redhat.com> <524f69650809161635o1f3830f3k4ea01858584cdd1a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: smfrench@austin.rr.com, linux-fsdevel@vger.kernel.org, linux-cifs-client@lists.samba.org To: "Steve French" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:43279 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbYIPX4o (ORCPT ); Tue, 16 Sep 2008 19:56:44 -0400 In-Reply-To: <524f69650809161635o1f3830f3k4ea01858584cdd1a@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 16 Sep 2008 18:35:58 -0500 "Steve French" wrote: > I will commit the patch to the cifs git development tree but wanted to > consider things: > > 1) your patch changes from open with FILE_WRITE_ATTRIBUTES to open with > GENERIC_WRITE by calling cifs_set_file_info Ahh ok. Just got the other mail. Yes, we could end up using a superset of FILE_WRITE_ATTRIBUTES if we already have an open fh we can use. I'm assuming that's OK (and preferred), but we could change it if we think it would be a problem. > 2) we should probably do the Open then RenameOpenFile whether or not the > cifs_set_file_info fails You mean that we should go ahead and do the silly_rename logic if the first CIFSSMBDelOpenFile call returns -ETXTBSY or -EACCES? That's probably reasonable and more efficient overall. It'll also mean less complex logic too. I like this idea. > 3) to remove the extern for a static in the c file, the function > cifs_set_file_info should be moved forward in the file > No objection here. I'll look at doing that. Good observations all around. There's no huge hurry here, so let me code up a respun set with some of these changes before you commit the last 3. We might as well get it right the first time... -- Jeff Layton