patch-2.4.27 linux-2.4.27/fs/jfs/xattr.c

Next file: linux-2.4.27/fs/namei.c
Previous file: linux-2.4.27/fs/jfs/super.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/fs/jfs/xattr.c linux-2.4.27/fs/jfs/xattr.c
@@ -550,7 +550,8 @@
 	}
 	ea_buf->flag = EA_EXTENT;
 	ea_buf->mp = read_metapage(inode, addressDXD(&ji->ea),
-				   lengthDXD(&ji->ea), 1);
+				   lengthDXD(&ji->ea) << sb->s_blocksize_bits,
+				   1);
 	if (ea_buf->mp == NULL)
 		return -EIO;
 	ea_buf->xattr = ea_buf->mp->data;
@@ -819,6 +820,8 @@
 
 static inline int can_get_xattr(struct inode *inode, const char *name)
 {
+	if(strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) == 0)
+		return 0;
 	return permission(inode, MAY_READ);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)