Re: [PATCH] Update /etc/mtab when using `mount --move`.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi,

 I know this patch (it's almost in all distros).

On Fri, Apr 13, 2007 at 07:26:39AM -0400, Mike Frysinger wrote:
> +				update_mtab(olddir, NULL);
> +				if (oldmc != NULL)
> +					my_free(olddir);
> +			}
> +
>  			lock_mtab();

 The problem with this solution is that the /etc/mtab file is updated
 in two steps and the file is unlocked between these steps. I think
 better solution is move the code to mtab_update() (same like for
 MS_REMOUNT).

 Yesterday I commited a little different solution ... see:

 http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=commitdiff;h=5e57135fa75476ec6227819e0ccc27d1c2434eda;hp=09dd84cac7fbc4886fdb92593898ea713f663dfd

 (My patch is not too much tested, but I'm going to write some regression
 tests for the mount command next week.)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux