From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pekka Enberg" Subject: Re: [PATCH 20 of 23] Unionfs: Internal include file Date: Fri, 13 Oct 2006 11:02:26 +0300 Message-ID: <84144f020610130102p4414f91fv9e2e4bee64690a16@mail.gmail.com> References: <4a0655b52aef552fe558.1160197659@thor.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org, hch@infradead.org, viro@ftp.linux.org.uk, mhalcrow@us.ibm.com, phillip@hellewell.homeip.net Return-path: Received: from nf-out-0910.google.com ([64.233.182.186]:16840 "EHLO nf-out-0910.google.com") by vger.kernel.org with ESMTP id S1750701AbWJMIC1 (ORCPT ); Fri, 13 Oct 2006 04:02:27 -0400 Received: by nf-out-0910.google.com with SMTP id x30so866040nfb for ; Fri, 13 Oct 2006 01:02:26 -0700 (PDT) To: "Josef Jeff Sipek" In-Reply-To: <4a0655b52aef552fe558.1160197659@thor.fsl.cs.sunysb.edu> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, On 10/7/06, Josef Jeff Sipek wrote: > +static inline void fist_copy_attr_atime(struct inode *dest, > + const struct inode *src) > +{ > + dest->i_atime = src->i_atime; > +} > + > +static inline void fist_copy_attr_times(struct inode *dest, > + const struct inode *src) > +{ > + dest->i_atime = src->i_atime; > + dest->i_mtime = src->i_mtime; > + dest->i_ctime = src->i_ctime; > +} > + > +static inline void fist_copy_attr_timesizes(struct inode *dest, > + const struct inode *src) > +{ > + dest->i_atime = src->i_atime; > + dest->i_mtime = src->i_mtime; > + dest->i_ctime = src->i_ctime; > + dest->i_size = src->i_size; > + dest->i_blocks = src->i_blocks; > +} > + > +static inline void fist_copy_attr_all(struct inode *dest, > + const struct inode *src) > +{ > + dest->i_mode = src->i_mode; > + /* we do not need to copy if the file is a deleted file */ > + if (dest->i_nlink > 0) > + dest->i_nlink = get_nlinks(dest); > + dest->i_uid = src->i_uid; > + dest->i_gid = src->i_gid; > + dest->i_rdev = src->i_rdev; > + dest->i_atime = src->i_atime; > + dest->i_mtime = src->i_mtime; > + dest->i_ctime = src->i_ctime; > + dest->i_blkbits = src->i_blkbits; > + dest->i_size = src->i_size; > + dest->i_blocks = src->i_blocks; > + dest->i_flags = src->i_flags; > +} Ecryptfs has the exact same bits. Please consolidate to common code.