linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: simply the code logic
@ 2012-07-21 15:38 zwu.kernel
  2012-07-21 16:34 ` Matthew Wilcox
  0 siblings, 1 reply; 2+ messages in thread
From: zwu.kernel @ 2012-07-21 15:38 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Zhi Yong Wu

From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
 fs/block_dev.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index c2bbe1f..0f268d3 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -396,10 +396,7 @@ static loff_t block_llseek(struct file *file, loff_t offset, int origin)
 			goto out;
 	}
 	if (offset >= 0 && offset <= size) {
-		if (offset != file->f_pos) {
-			file->f_pos = offset;
-		}
-		retval = offset;
+		retval = file->f_pos = offset;
 	}
 out:
 	mutex_unlock(&bd_inode->i_mutex);
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-21 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-21 15:38 [PATCH] vfs: simply the code logic zwu.kernel
2012-07-21 16:34 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).