seq_file.c (3eb66e91a25497065c5322b1268cbc3953642227) seq_file.c (0a4c92657f2543bb8fd480c5af90c6bb87f18e00)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/seq_file.c
4 *
5 * helper functions for making synthetic files from sequences of records.
6 * initial implementation -- AV, Oct 2001.
7 */
8

--- 303 unchanged lines hidden (view full) ---

312 struct seq_file *m = file->private_data;
313 loff_t retval = -EINVAL;
314
315 mutex_lock(&m->lock);
316 m->version = file->f_version;
317 switch (whence) {
318 case SEEK_CUR:
319 offset += file->f_pos;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/seq_file.c
4 *
5 * helper functions for making synthetic files from sequences of records.
6 * initial implementation -- AV, Oct 2001.
7 */
8

--- 303 unchanged lines hidden (view full) ---

312 struct seq_file *m = file->private_data;
313 loff_t retval = -EINVAL;
314
315 mutex_lock(&m->lock);
316 m->version = file->f_version;
317 switch (whence) {
318 case SEEK_CUR:
319 offset += file->f_pos;
320 /* fall through */
320 case SEEK_SET:
321 if (offset < 0)
322 break;
323 retval = offset;
324 if (offset != m->read_pos) {
325 while ((retval = traverse(m, offset)) == -EAGAIN)
326 ;
327 if (retval) {

--- 772 unchanged lines hidden ---
321 case SEEK_SET:
322 if (offset < 0)
323 break;
324 retval = offset;
325 if (offset != m->read_pos) {
326 while ((retval = traverse(m, offset)) == -EAGAIN)
327 ;
328 if (retval) {

--- 772 unchanged lines hidden ---