Skip to content

Commit 184012a

Browse files
committed
dtlk: remove double call to nonseekable_open
dtlk_open currently has 2 calls to nonseekable_open which are both executed on success path. It was not hurting to make the extra call as nonseekable_open is only changing file->f_flags in idempotent way. However the first nonseekable_open is indeed both unneeded and looks suspicious. The first nonseekable_open was added in 6244f13 ("Fix up a couple of drivers - notable sg - for nonseekability."; 2004-Aug-7). The second nonseekable_open call was introduced in dc5c724 ("Remove ESPIPE logic from drivers, letting the VFS layer handle it instead.; 2004-Aug-8). The latter patch being mass change probably missed to remove nonseekable_open that was introduced into dtlk_open the day before. Fix it: remove the extra/unneeded nonseekable_open call and leave the call to nonseekable_open only on the path where we are actually opening the file. Suggested-by: Pavel Machek <pavel@denx.de> Signed-off-by: Kirill Smelkov <kirr@nexedi.com>
1 parent e93c9c9 commit 184012a

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎drivers/char/dtlk.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ static int dtlk_open(struct inode *inode, struct file *file)
298298
{
299299
TRACE_TEXT("(dtlk_open");
300300

301-
nonseekable_open(inode, file);
302301
switch (iminor(inode)) {
303302
case DTLK_MINOR:
304303
if (dtlk_busy)

0 commit comments

Comments
 (0)