lkml.org 
[lkml]   [2011]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2 v2] fs: add SEEK_HOLE and SEEK_DATA flags
Il 04/05/2011 19:58, Josef Bacik ha scritto:
> + if (offset>= i_size_read(inode)) {
> + mutex_unlock(&inode->i_mutex);
> + return -ENXIO;
> + }
> + offset = i_size_read(inode);
> + break;

I can add that generic_file_llseek_unlocked means *unlocked* so you
shouldn't unlock any mutex but only return a value. The current version,
in case of SEEK_END uses directly i_size indeed, so maybe I'm missing
something.

Marco


\
 
 \ /
  Last update: 2011-05-05 21:27    [W:1.415 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site