[PATCH 1/2] PMFS: [readdir] convert pmfs

Matthew Wilcox willy at linux.intel.com
Tue Oct 22 10:28:31 EDT 2013


On Mon, Oct 21, 2013 at 04:14:18PM -0600, Vishal Verma wrote:
> -				/* On error, skip the f_pos to the next block. */
> -				filp->f_pos = (filp->f_pos | (sb->s_blocksize - 1)) + 1;
> -				ret = stored;
> -				goto out;
> +				/* On error, skip to the next block. */
> +				ctx->pos = (ctx->pos | (sb->s_blocksize - 1)) + 1;
> +				break;

Isn't that simply:

+				ctx->pos = ALIGN(ctx->pos, sb->s_blocksize);

> -				error = filldir(dirent, de->name, de->name_len,
> -						filp->f_pos, ino,
> -						IF2DT(le16_to_cpu(pi->i_mode)));
> -				if (error)
> -					break;
> -				stored++;
> +				if(!dir_emit(ctx, de->name, de->name_len,
> +					ino, IF2DT(le16_to_cpu(pi->i_mode))))
> +					return 0;

Space between 'if' and '('.




More information about the Linux-pmfs mailing list