浏览代码

Btrfs: Force f_pos to the max when a readdir hits the end of the directory.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 年之前
父节点
当前提交
c2a8b6e110
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/btrfs/inode.c

+ 1 - 1
fs/btrfs/inode.c

@@ -1430,7 +1430,7 @@ read_dir_items:
 			di = (struct btrfs_dir_item *)((char *)di + di_len);
 			di = (struct btrfs_dir_item *)((char *)di + di_len);
 		}
 		}
 	}
 	}
-	filp->f_pos++;
+	filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
 nopos:
 nopos:
 	ret = 0;
 	ret = 0;
 err:
 err: