diff options
author | Vadim Kuznetsov <vadimk@gentoo.org> | 2012-02-04 16:15:00 +0000 |
---|---|---|
committer | Vadim Kuznetsov <vadimk@gentoo.org> | 2012-02-04 16:15:00 +0000 |
commit | f133459d7f91214264dcc3f26274f55ddb4e8c75 (patch) | |
tree | c1903ad0844d58745cf7f1ab8c13c9a31145bab8 /app-emulation/open-vm-tools-kmod/files/setnlink.patch | |
parent | open-vm-tools: version bump (masked) (diff) | |
download | vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.tar.gz vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.tar.bz2 vmware-f133459d7f91214264dcc3f26274f55ddb4e8c75.zip |
open-vm-tools-kmod: patches for kernel ge 3.2.0
open-vm-tools-2011.12.20.562307 version bump.
svn path=/trunk/; revision=533
Diffstat (limited to 'app-emulation/open-vm-tools-kmod/files/setnlink.patch')
-rw-r--r-- | app-emulation/open-vm-tools-kmod/files/setnlink.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app-emulation/open-vm-tools-kmod/files/setnlink.patch b/app-emulation/open-vm-tools-kmod/files/setnlink.patch new file mode 100644 index 0000000..9ae4fe7 --- /dev/null +++ b/app-emulation/open-vm-tools-kmod/files/setnlink.patch @@ -0,0 +1,45 @@ +diff --git a/modules/linux/vmhgfs/fsutil.c b/modules/linux/vmhgfs/fsutil.c +index 0c5102b..a978005 100644 +--- a/modules/linux/vmhgfs/fsutil.c ++++ b/modules/linux/vmhgfs/fsutil.c +@@ -62,6 +62,31 @@ static int HgfsPackGetattrRequest(HgfsReq *req, + * Private function implementations. + */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) ++/* ++ *---------------------------------------------------------------------------- ++ * ++ * set_nlink -- ++ * ++ * Set an inode's link count. ++ * ++ * Results: ++ * None ++ * ++ * Side effects: ++ * None ++ * ++ *---------------------------------------------------------------------------- ++ */ ++ ++static inline void ++set_nlink(struct inode *inode, unsigned int nlink) ++{ ++ inode->i_nlink = nlink; ++} ++#endif ++ ++ + /* + *---------------------------------------------------------------------- + * +@@ -607,7 +632,7 @@ HgfsChangeFileAttributes(struct inode *inode, // IN/OUT: Inode + * account for '.' and ".."), and find printed a hard link error. So until + * we have getattr support for nlink, everyone gets 1. + */ +- inode->i_nlink = 1; ++ set_nlink(inode, 1); + + /* + * Use the stored uid and gid if we were given them at mount-time, or if |