source: trunk/server/common/patches/openafs-linux-3.2-nlink.patch @ 2159

Last change on this file since 2159 was 2143, checked in by achernya, 12 years ago
Update openafs to build against kernel 3.2
File size: 1005 bytes
RevLine 
[2143]1As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
2direct modification.
3
4Original patch was:
5
6From c4442772286c0a1fdb99500d65e7d6f295388feb Mon Sep 17 00:00:00 2001
7From: Anders Kaseorg <andersk@mit.edu>
8Date: Sun, 20 Nov 2011 19:00:00 -0500
9Subject: [PATCH] Linux: 3.2: Use set_nlink to update i_nlink
10Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea
11
12Since handling m4 changes is annoying with spec files, we assume
13that set_nlink is available.  This patch will break on old versions
14of Linux, specifically prior to v3.1-8781-gd211858.
15
16diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
17index 596d064..d32720f 100644
18--- a/src/afs/LINUX/osi_vfsops.c
19+++ b/src/afs/LINUX/osi_vfsops.c
20@@ -439,7 +439,7 @@ void
21 vattr2inode(struct inode *ip, struct vattr *vp)
22 {
23     ip->i_ino = vp->va_nodeid;
24-    ip->i_nlink = vp->va_nlink;
25+    set_nlink(ip, vp->va_nlink);
26     ip->i_blocks = vp->va_blocks;
27 #ifdef STRUCT_INODE_HAS_I_BLKBITS
28     ip->i_blkbits = AFS_BLKBITS;
Note: See TracBrowser for help on using the repository browser.