From patchwork Sun Oct 5 16:23:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 396662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B2755140078 for ; Mon, 6 Oct 2014 03:23:29 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=LgWX TGmCWkdNBcXzOw5Gk+7N3Wklu6+PSuHcuXyft1PD8PJOkcuju/1kKCpbf4jH2KWZ a6CZGLYvC5wEl+oCLByPrEEC6dflHahbE/vTn1fzS3lAnpu2pMvytzFkNmGLuG5v VVn6K0hJlb4WM57XFyLnKY37lP3WVlQXMInntKE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=HfFSNPtpSG JqlpL8WMhfDQZy//o=; b=bt+JgYOG0K6ohjpaVfj4kR+CNEGja/58It6y6TH9/L CYIxvBkZPhkATvPUDRIzJoYr6QVsl2bKm3Vbyp3rwnRT0wGAgPf5oRCYbgeiNBYk WqIQSs+DJeUNUfsABZc0GVJ/48sl+VsIKay7GphNHJ9/qY7OmnqIMRH+FzZX2aD1 0= Received: (qmail 12469 invoked by alias); 5 Oct 2014 16:23:24 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12459 invoked by uid 89); 5 Oct 2014 16:23:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: newverein.lst.de Date: Sun, 5 Oct 2014 18:23:17 +0200 From: Christoph Hellwig To: Rich Felker Cc: "Joseph S. Myers" , Roland McGrath , libc-alpha@sourceware.org Subject: Re: C11 threads ABI questions - enum values Message-ID: <20141005162317.GA12566@lst.de> References: <20141003151917.GS23797@brightrain.aerifal.cx> <20141003153248.GT23797@brightrain.aerifal.cx> <20141003183910.GA8806@lst.de> <20141003194932.GU23797@brightrain.aerifal.cx> <20141004175346.GA23717@lst.de> <20141004225756.GV23797@brightrain.aerifal.cx> <20141005094913.GA7947@lst.de> <20141005161358.GW23797@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20141005161358.GW23797@brightrain.aerifal.cx> User-Agent: Mutt/1.5.17 (2007-11-01) On Sun, Oct 05, 2014 at 12:13:58PM -0400, Rich Felker wrote: > Yes, the lack of support for fchown, fchmod, fstat, fstatfs, fchdir, fstat, fstatfs and fchdir are already support on O_PATH descriptos, and below is an untested patch for fchmod and fchown. diff --git a/fs/open.c b/fs/open.c index d6fd3ac..ee24720 100644 --- a/fs/open.c +++ b/fs/open.c @@ -512,7 +512,7 @@ out_unlock: SYSCALL_DEFINE2(fchmod, unsigned int, fd, umode_t, mode) { - struct fd f = fdget(fd); + struct fd f = fdget_raw(fd); int err = -EBADF; if (f.file) { @@ -633,7 +633,7 @@ SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) { - struct fd f = fdget(fd); + struct fd f = fdget_raw(fd); int error = -EBADF; if (!f.file)