Skip to contentSkip to conversation

Set SB_POSIXACL if the server supports the extension

PATCH New [email protected] 1 participant 1 message Jan 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 7/8 Set SB_POSIXACL if the server supports the extension

From: Rick Macklem <[email protected]>

Check to see if both the POSIX draft default ACL and POSIX draft access ACL are supported by the server. If so, set SB_POSIXACL.

---
 fs/nfs/super.c | 7 +++++++
 1 file changed, 7 insertions(+)
fs/nfs/super.c +7 -0
index 57d372db03b9..04c40c9d783a 100644
@@ -1352,6 +1352,13 @@ int nfs_get_tree_common(struct fs_context *fc)
 		goto error_splat_super;
 	}
 
+#ifdef CONFIG_NFS_V4_2
+	/* Set SB_POSIXACL if the server supports the NFSv4.2 extension. */
+	if ((server->attr_bitmask[2] & FATTR4_WORD2_POSIX_DEFAULT_ACL) &&
+	    (server->attr_bitmask[2] & FATTR4_WORD2_POSIX_ACCESS_ACL))
+		s->s_flags |= SB_POSIXACL;
+#endif
+
 	s->s_flags |= SB_ACTIVE;
 	error = 0;
 
Signature · 1 line
2.49.0