blob: 9ae4fe7a4fef35fd245179453d3058b9e2d1491f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
|