Whamcloud - gitweb
LU-4629 ldlm: fix uninitialized variable
[fs/lustre-release.git] / lustre / obdclass / linkea.c
index 8fd9076..18e3d16 100644 (file)
@@ -33,7 +33,7 @@
 
 int linkea_data_new(struct linkea_data *ldata, struct lu_buf *buf)
 {
-       ldata->ld_buf = lu_buf_check_and_alloc(buf, CFS_PAGE_SIZE);
+       ldata->ld_buf = lu_buf_check_and_alloc(buf, PAGE_CACHE_SIZE);
        if (ldata->ld_buf->lb_buf == NULL)
                return -ENOMEM;
        ldata->ld_leh = ldata->ld_buf->lb_buf;
@@ -72,9 +72,8 @@ EXPORT_SYMBOL(linkea_init);
  * Numbers are always big-endian
  * \retval record length
  */
-static int linkea_entry_pack(struct link_ea_entry *lee,
-                            const struct lu_name *lname,
-                            const struct lu_fid *pfid)
+int linkea_entry_pack(struct link_ea_entry *lee, const struct lu_name *lname,
+                     const struct lu_fid *pfid)
 {
        struct lu_fid   tmpfid;
        int             reclen;
@@ -90,6 +89,7 @@ static int linkea_entry_pack(struct link_ea_entry *lee,
        lee->lee_reclen[1] = reclen & 0xff;
        return reclen;
 }
+EXPORT_SYMBOL(linkea_entry_pack);
 
 void linkea_entry_unpack(const struct link_ea_entry *lee, int *reclen,
                         struct lu_name *lname, struct lu_fid *pfid)