rc = ll_lock(inode, NULL, &it, &lockh);
request = (struct ptlrpc_request *)it.it_data;
ptlrpc_free_req(request);
- if (rc != ELDLM_OK)
+ if (rc != ELDLM_OK) {
CERROR("lock enqueue: err: %d\n", rc);
+ UnlockPage(page);
+ RETURN(rc);
+ }
ldlm_lock_dump((void *)(unsigned long)lockh.addr);
-
if (Page_Uptodate(page)) {
CERROR("Explain this please?\n");
GOTO(readpage_out, rc);
for (offs = limit; offs<PAGE_CACHE_SIZE; offs += chunk_size) {
ext2_dirent *p = (ext2_dirent*)(kaddr + offs);
p->rec_len = cpu_to_le16(chunk_size);
+ p->name_len = 0;
+ p->inode = 0;
}
if (!limit)
goto out;
de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
}
-int
-ll_readdir (struct file * filp, void * dirent, filldir_t filldir)
+int ll_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
loff_t pos = filp->f_pos;
struct inode *inode = filp->f_dentry->d_inode;
unsigned chunk_mask = ~(ext2_chunk_size(inode)-1);
unsigned char *types = NULL;
int need_revalidate = (filp->f_version != inode->i_version);
+ ENTRY;
if (pos > inode->i_size - EXT2_DIR_REC_LEN(1))
GOTO(done, 0);
return de;
}
-ino_t ll_inode_by_name(struct inode * dir, struct dentry *dentry, int *type)
+obd_id ll_inode_by_name(struct inode * dir, struct dentry *dentry, int *type)
{
- ino_t res = 0;
+ obd_id res = 0;
struct ext2_dir_entry_2 * de;
struct page *page;