-static int
-zpl_common_readdir(struct file *filp, void *dirent, filldir_t filldir)
-{
- struct dentry *dentry = filp->f_path.dentry;
- struct inode *ip = dentry->d_inode;
- int error = 0;
-
- switch (filp->f_pos) {
- case 0:
- error = filldir(dirent, ".", 1, 0, ip->i_ino, DT_DIR);
- if (error)
- break;
-
- filp->f_pos++;
- /* fall-thru */
- case 1:
- error = filldir(dirent, "..", 2, 1, parent_ino(dentry), DT_DIR);
- if (error)
- break;
-
- filp->f_pos++;
- /* fall-thru */
- default:
- break;
- }
-
- return (error);
-}
-