lkml.org 
[lkml]   [1999]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [2.2.1 bug: loop remounts]
On Wed, 3 Mar 1999, Chris Evans wrote:

> I think this is a bug although of course it might be a case of us simply
> not supporting this.
>
> mount -o remount,ro /some/loopfile/based/mount
>
> I get
> ioctl: LOOP_SET_FD: Device or resource busy

Look at what it's doing - you'll probably find that it's a mount bug,
rather than a kernel one.

strace it and you'll probably find it trying to change the loop device
fd.

This:
--- loop.c.orig Wed Mar 3 20:35:13 1999
+++ loop.c Wed Mar 3 20:39:13 1999
@@ -344,14 +344,15 @@

MOD_INC_USE_COUNT;

- error = -EBUSY;
- if (lo->lo_dentry)
- goto out;
-
error = -EBADF;
file = fget(arg);
if (!file)
goto out;
+
+ if (lo->lo_dentry) {
+ error = (lo->lo_dentry->d_inode == file->f_dentry->d_inode) ? 0 : -EBUSY;
+ goto out;
+ }

error = -EINVAL;
inode = file->f_dentry->d_inode;

might be an acceptable workaround, though.

Matthew.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.033 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site