Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 14 Aug 2002 16:47:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 14 Aug 2002 16:46:57 -0400 Received: from berzerk.gpcc.itd.umich.edu ([141.211.2.162]:62166 "EHLO berzerk.gpcc.itd.umich.edu") by vger.kernel.org with ESMTP id ; Wed, 14 Aug 2002 16:45:17 -0400 Date: Wed, 14 Aug 2002 16:49:08 -0400 (EDT) From: "Kendrick M. Smith" X-X-Sender: kmsmith@vanguard.gpcc.itd.umich.edu To: linux-kernel@vger.kernel.org, Subject: REPOST patch 26/38: SERVER: new routine fh_dup2() Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 821 Lines: 28 Define fh_dup2(), which copies a _verified_ filehandle, taking care of refcounts accordingly. (This will be used by RESTOREFH/SAVEFH and a few other places.) --- old/include/linux/nfsd/nfsfh.h Thu Aug 1 16:16:29 2002 +++ new/include/linux/nfsd/nfsfh.h Sun Aug 11 22:56:12 2002 @@ -238,6 +238,14 @@ fh_copy(struct svc_fh *dst, struct svc_f return dst; } +static __inline__ void +fh_dup2(struct svc_fh *dst, struct svc_fh *src) +{ + fh_put(dst); + dget(src->fh_dentry); + *dst = *src; +} + static __inline__ struct svc_fh * fh_init(struct svc_fh *fhp, int maxsize) { - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/