From: Russ Allbery Date: Tue, 8 Feb 2011 09:02:07 +0000 (-0800) Subject: Merge branch 'upstream' X-Git-Tag: debian/1.4.14+dfsg-1~1 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e87c9481728bbce4474266d2fe40644100d28882;p=packages%2Fo%2Fopenafs.git Merge branch 'upstream' --- e87c9481728bbce4474266d2fe40644100d28882 diff --cc src/afs/LINUX/osi_compat.h index e4d0c28de,df887519d..37465fa80 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@@ -136,12 -136,24 +136,32 @@@ init_once_func(void * foo) #define KALLOC_TYPE GFP_KERNEL #endif +#ifdef LINUX_KEYRING_SUPPORT +# ifndef KEY_ALLOC_NOT_IN_QUOTA +# define KEY_ALLOC_NOT_IN_QUOTA 1 +# endif +# ifndef KEY_ALLOC_IN_QUOTA +# define KEY_ALLOC_IN_QUOTA 0 +# endif +#endif #endif + + static inline int + afs_inode_setattr(struct osi_file *afile, struct iattr *newattrs) { + + int code = 0; + struct inode *inode = OSIFILE_INODE(afile); + #if !defined(HAVE_LINUX_INODE_SETATTR) + code = inode->i_op->setattr(afile->filp->f_dentry, newattrs); + #elif defined(INODE_SETATTR_NOT_VOID) + #if defined(AFS_LINUX26_ENV) + if (inode->i_op && inode->i_op->setattr) + code = inode->i_op->setattr(afile->filp->f_dentry, newattrs); + else + #endif + code = inode_setattr(inode, newattrs); + #else + inode_setattr(inode, newattrs); + #endif + return code; + }