| Last change
                  on this file since 2164 was
                  2143,
                  checked in by achernya, 14 years ago | 
        
          | Update openafs to build against kernel 3.2 | 
        | File size:
            1005 bytes | 
      
      
        
  | Rev | Line |  | 
|---|
| [2143] | 1 | As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent | 
|---|
|  | 2 | direct modification. | 
|---|
|  | 3 |  | 
|---|
|  | 4 | Original patch was: | 
|---|
|  | 5 |  | 
|---|
|  | 6 | From c4442772286c0a1fdb99500d65e7d6f295388feb Mon Sep 17 00:00:00 2001 | 
|---|
|  | 7 | From: Anders Kaseorg <andersk@mit.edu> | 
|---|
|  | 8 | Date: Sun, 20 Nov 2011 19:00:00 -0500 | 
|---|
|  | 9 | Subject: [PATCH] Linux: 3.2: Use set_nlink to update i_nlink | 
|---|
|  | 10 | Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea | 
|---|
|  | 11 |  | 
|---|
|  | 12 | Since handling m4 changes is annoying with spec files, we assume | 
|---|
|  | 13 | that set_nlink is available.  This patch will break on old versions | 
|---|
|  | 14 | of Linux, specifically prior to v3.1-8781-gd211858. | 
|---|
|  | 15 |  | 
|---|
|  | 16 | diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c | 
|---|
|  | 17 | index 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.