lkml.org 
[lkml]   [1997]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] sys_mount inconsistency in 2.0.33
    	Hi!
    There is some inconsistency in sys_mount (actually do_mount).
    If we try to mount on the regular file with i_count>1 it returns EBUSY
    instead of ENOTDIR. The following is an obvious patch for 2.0.33.

    ------------------------------------------------------------------------------
    diff -u -r -N linux-2.0.33-orig/fs/super.c linux/fs/super.c
    --- linux-2.0.33-orig/fs/super.c Thu Nov 13 04:56:09 1997
    +++ linux/fs/super.c Sun Dec 28 23:06:36 1997
    @@ -709,13 +709,13 @@
    error = namei(dir_name, &dir_i);
    if (error)
    return error;
    - if (dir_i->i_count != 1 || dir_i->i_mount) {
    - iput(dir_i);
    - return -EBUSY;
    - }
    if (!S_ISDIR(dir_i->i_mode)) {
    iput(dir_i);
    return -ENOTDIR;
    + }
    + if (dir_i->i_count != 1 || dir_i->i_mount) {
    + iput(dir_i);
    + return -EBUSY;
    }
    if (!fs_may_mount(dev)) {
    iput(dir_i);

    \
     
     \ /
      Last update: 2005-03-22 13:40    [W:0.023 / U:300.956 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site