Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, 2008-02-14 at 09:30 +0100, Miklos Szeredi wrote: And this is where we usually conclude, that a new userspace mount API is long overdue. So for starters, how about a new syscall for bind mounts: int mount_bind(const char *src, const char *dst, unsigned flags, unsigned mnt_flags); If you're going to add a new bind mount interface, then please consider adding 'openat'-like file descriptors. I'm already looking into doing this for the main 'mount' interface in order to solve the automounting problem when dealing with arbitrary namespaces. Cheers Trond --- From: Trond Myklebust [EMAIL PROTECTED] VFS: Add support for a new mountat() system call sys_mountat() basically adds an openat()-like 'dirfd' argument to the mount system call interface. This is needed in order to support automounting in the presence of arbitrary user namespaces. It does so by allowing the kernel to encode the namespace+directory information in a directory file descriptor that may be passed to an automounter daemon that is running in a different namespace. Signed-off-by: Trond Myklebust [EMAIL PROTECTED] --- fs/namespace.c | 47 ++ include/linux/syscalls.h |5 + 2 files changed, 40 insertions(+), 12 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index 9025d22..53b5943 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -670,7 +670,7 @@ static int do_umount(struct vfsmount *mnt, int flags) * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD */ -asmlinkage long sys_umount(char __user * name, int flags) +asmlinkage long sys_umountat(int dfd, char __user * name, int flags) { struct nameidata nd; int retval; @@ -695,6 +695,11 @@ out: return retval; } +asmlinkage long sys_umount(char __user * name, int flags) +{ + return sys_umountat(AT_FDCWD, name, flags); +} + #ifdef __ARCH_WANT_SYS_OLDUMOUNT /* @@ -963,7 +968,7 @@ static noinline int do_change_type(struct nameidata *nd, int flag) * do loopback mount. * noinline this do_mount helper to save do_mount stack space. */ -static noinline int do_loopback(struct nameidata *nd, char *old_name, +static noinline int do_loopback(struct nameidata *nd, int dfd, char *old_name, int recurse) { struct nameidata old_nd; @@ -973,7 +978,7 @@ static noinline int do_loopback(struct nameidata *nd, char *old_name, return err; if (!old_name || !*old_name) return -EINVAL; - err = path_lookup(old_name, LOOKUP_FOLLOW, old_nd); + err = path_lookup_fd(dfd, old_name, LOOKUP_FOLLOW, old_nd); if (err) return err; @@ -1053,7 +1058,7 @@ static inline int tree_contains_unbindable(struct vfsmount *mnt) /* * noinline this do_mount helper to save do_mount stack space. */ -static noinline int do_move_mount(struct nameidata *nd, char *old_name) +static noinline int do_move_mount(struct nameidata *nd, int dfd, char *old_name) { struct nameidata old_nd, parent_nd; struct vfsmount *p; @@ -1062,7 +1067,7 @@ static noinline int do_move_mount(struct nameidata *nd, char *old_name) return -EPERM; if (!old_name || !*old_name) return -EINVAL; - err = path_lookup(old_name, LOOKUP_FOLLOW, old_nd); + err = path_lookup_fd(dfd, old_name, LOOKUP_FOLLOW, old_nd); if (err) return err; @@ -1445,7 +1450,8 @@ int copy_mount_options(const void __user * data, unsigned long *where) * Therefore, if this magic number is present, it carries no information * and must be discarded. */ -long do_mount(char *dev_name, char *dir_name, char *type_page, +static long do_mountat(int devdfd, char *dev_name, + int dirdfd, char *dir_name, char *type_page, unsigned long flags, void *data_page) { struct nameidata nd; @@ -1484,7 +1490,8 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT); /* ... and get the mountpoint */ - retval = path_lookup(dir_name, LOOKUP_FOLLOW|LOOKUP_MOUNT, nd); + retval = path_lookup_fd(dirdfd, dir_name, LOOKUP_FOLLOW|LOOKUP_MOUNT, + nd); if (retval) return retval; @@ -1496,11 +1503,11 @@ long do_mount(char *dev_name, char *dir_name, char *type_page, retval = do_remount(nd, flags ~MS_REMOUNT, mnt_flags, data_page); else if (flags MS_BIND) - retval = do_loopback(nd, dev_name, flags MS_REC); + retval = do_loopback(nd, devdfd, dev_name, flags MS_REC); else if (flags (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)) retval = do_change_type(nd, flags); else if (flags MS_MOVE) - retval =
Re: i_version changes
Jean noel Cordenner wrote: hi, Peter Staubach a écrit : Is the perceived performance hit really going to be as large as suspected? We already update the time fields fairly often and we don't pay a huge penalty for those, or at least not a penalty that we aren't willing to pay. Has anyone measured the cost? Few month ago, I ran a FFSB test on a 2.6.23 kernel enabling or not the i_version flag. http://bullopensource.org/ext4/20071116/ffsb-write.html This is good information. A couple of questions -- what is the -I 256 option used for the ext4 mkfs? What was the variance between the results of the 5 runs? Is 2% significant or not? Thanx... ps - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, Feb 14, 2008 at 12:30 AM, Miklos Szeredi [EMAIL PROTECTED] wrote: For recursive bind mounts, only the root of the tree being bound inherits the per-mount flags from the mount() arguments; sub-mounts inherit their per-mount flags from the source tree as usual. This is rather strange behavior. I think it would be much better, if setting mount flags would work for recursive operations as well. Also what we really need is not resetting all the mount flags to some predetermined values, but to be able to set or clear each flag individually. This is certainly true, but as you observe below it's a fair bit more fiddly to specify in the API. I wasn't sure how much people recursive bind mounts, so I figured I'd throw out this simpler version first. For example, with the per-mount-read-only thing the most useful application would be to just set the read-only flag and leave the others alone. And this is where we usually conclude, that a new userspace mount API is long overdue. So for starters, how about a new syscall for bind mounts: int mount_bind(const char *src, const char *dst, unsigned flags, unsigned mnt_flags); The flags argument could be the same as for regular mount, and contain the mnt_flags - so the extra argument could maybe usefully be a mnt_flags_mask, to indicate which flags we actually care about overriding. What would happen when an existing super-block flag changes to become a per-mount flag (e.g. per-mount read-only)? I think that would just fit in with the mask idea, as long as we complained if any bits in mnt_flags_mask weren't actually per-mount settable. Being able to mask/set mount flags might be useful on a remount too, since there's no clean way to get the existing mount flags for a mount other than by scanning /proc/mounts. So an alternative to a separate system call would be a new mnt_flag_mask argument to mount() (whose presence would be indicated by a flag bit being set in the main flags) which would be used to control which bits were set cleared for remount/bind calls. Seems a bit wasteful of bits though. If we turned flags into an (optionally) 64-bit argument then we'd have plenty of bits to be able to specify both a set bit and a mask bit for each, without needing a new syscall. Paul - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
[ cc: linux-fsdevel ] On Thu, Feb 14, 2008 at 7:22 AM, Paul Menage [EMAIL PROTECTED] wrote: On Wed, Feb 13, 2008 at 10:02 PM, Christoph Hellwig [EMAIL PROTECTED] wrote: I think this concept is reasonable, but I don't think MS_BIND_FLAGS is a descriptive name for this flag. MS_EXPLICIT_FLAGS might be better but still isn't optimal. MS_BIND_FLAGS_OVERRIDE ? Paul - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, 2008-02-14 at 17:03 +0100, Miklos Szeredi wrote: And I'm not against doing it with the at* variants, as Trond suggested. If you're going to change the syscall, then you should ensure that it solves _all_ the problems that are known at this time. Ignoring the automounter issue is just going to force us to redo the syscall in a couple of months... Trond - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
Maybe instead of messing with masks, it's better to introduce a get_flags() or a more general mount_stat() operation, and let userspace deal with setting and clearing flags, just as we do for stat/chmod? So we'd have mount_stat(path, stat); mount_bind(from, to, flags); mount_set_flags(path, flags); mount_move(from, to); and perhaps mount_remount(path, opt_string, flags); Sounds reasonable to me. But it wouldn't directly solve the do a recursive bind mount setting the MS_READONLY flag on all children problem, so we'd need some of the earlier suggestions too. Doh, you're right. Let's try the original idea, but a bit cleaner: /* flags: */ #define MNT_CTRL_RECURSE (1 0) /* mnt_flags: */ #define MNT_NOSUID 0x01 #define MNT_NODEV 0x02 #define MNT_NOEXEC 0x04 #define MNT_NOATIME 0x08 #define MNT_NODIRATIME 0x10 #define MNT_RELATIME0x20 #define MNT_SHARED 0x1000 #define MNT_UNBINDABLE 0x2000 #define MNT_PNODE_MASK 0x3000 struct mount_param { u64 flags; /* control flags */ u64 mnt_flags; /* new mount flags */ u64 mnt_flags_mask; /* mask for new mount flags */ }; int mount_bindat(int fromfd, const char *frompath, int tofd, const char *topath, struct mount_param *param); int mount_setflagsat(int fd, const char *path, struct mount_param *param); int mount_moveat(int fromfd, const char *frompath, int tofd, const char *topath); ... I deliberately not used the MS_* flags, which is currently a messy mix of things with totally different meanings. Does this solve all the issues? Miklos - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
And I'm not against doing it with the at* variants, as Trond suggested. If you're going to change the syscall, then you should ensure that it solves _all_ the problems that are known at this time. Ignoring the automounter issue is just going to force us to redo the syscall in a couple of months... Sure. Although, an (almost) equivalent userspace code would be: mount_fooat(int fd, const char *path) { char tmpbuf[64]; int tmpfd = openat(fd, path); sprintf(tmpbuf, /proc/self/fd/%i, tmpfd); return mount_foo(tmpbuf, ...); } Or is there something (other than not requiring proc) that the *at variant gives? Miklos - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, Feb 14, 2008 at 9:31 AM, Miklos Szeredi [EMAIL PROTECTED] wrote: I deliberately not used the MS_* flags, which is currently a messy mix of things with totally different meanings. Does this solve all the issues? We should add a size parameter either in the mount_params or as a final argument, for future extensibility. And we might as well include MNT_READONLY in the API on the assumption that per-mount readonly will be available soon. Paul - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Add linux-fsdevel to VFS entry in MAINTAINERS
Add linux-fsdevel to the VFS entry in MAINTAINERS Signed-off-by: Paul Menage [EMAIL PROTECTED] --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) Index: 2.6.24-mm1-bindflags/MAINTAINERS === --- 2.6.24-mm1-bindflags.orig/MAINTAINERS +++ 2.6.24-mm1-bindflags/MAINTAINERS @@ -1616,6 +1616,7 @@ S:Maintained FILESYSTEMS (VFS and infrastructure) P: Alexander Viro M: [EMAIL PROTECTED] +L: linux-fsdevel@vger.kernel.org S: Maintained FIREWIRE SUBSYSTEM (drivers/firewire, linux/firewire*.h) - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, 2008-02-14 at 18:39 +0100, Miklos Szeredi wrote: And I'm not against doing it with the at* variants, as Trond suggested. If you're going to change the syscall, then you should ensure that it solves _all_ the problems that are known at this time. Ignoring the automounter issue is just going to force us to redo the syscall in a couple of months... Sure. Although, an (almost) equivalent userspace code would be: mount_fooat(int fd, const char *path) { char tmpbuf[64]; int tmpfd = openat(fd, path); sprintf(tmpbuf, /proc/self/fd/%i, tmpfd); return mount_foo(tmpbuf, ...); } Or is there something (other than not requiring proc) that the *at variant gives? The ability to have a daemon handle mounting onto a directory that only exists in another process's private namespace. Say I'm running in my private namespace that contains paths that are not shared by the trusted 'init' namespace. If I were to step on an autofs-like trap, I'd like for the kernel to be able to notify the automounter that is running in the trusted namespace set up by 'init', and have it mount the directory onto my namespace. This should happen even if the path is not shared. With mountat() the kernel can still pass the necessary information to the automounter by giving it a directory file descriptor 'fd' that points to the directory on top of which it wants the mount to occur. Then automounter then executes mountat(AT_FDCWD, dev_name, fd, '.', type, flags, data); and hey presto, the magic occurs. - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
jffs2 console printk storm
Hi David, This has been a problem I've seen for a while. I've generated a jffs2 image of an empty directory (I don't recall the version of the jffs2 utils I've used to generate it). I mount the jffs2 image something like this: # cp jffs2-empty.img /tmp/fs.0 # losetup /dev/loop0 /tmp/fs.0 # modprobe block2mtd block2mtd=/dev/loop0,128ki # mount -t jffs2 mtd0 /n/lower/b0 Then I start running my tests in it (in /n/lower/b0). I get a lot of these two kinds of console printk messages (esp. the first one): CLEANMARKER node found at 0x0081, not first node in block (0x0080) Empty flash at 0x0080ff70 ends at 0x0081 I don't know how serious the messages are, but jffs2 seems to work fine for me even with those many kernel messages scrolling off of my screen. I could not find a way to turn off these warnings: jffs2's debugging config options allow me to turn on more messages, but not to turn off these. Is there a way to prevent these messages from showing up? Are they serious? Is my jffs2 image bad/corrupt? If so, how should I fix it? In the mean time, I've been using the small patch below to turn the above two messages into jffs2 debugging messages. Thanks, Erez. diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 272872d..16f428c 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -646,8 +646,8 @@ scan_more: inbuf_ofs = ofs - buf_ofs; while (inbuf_ofs scan_end) { if (unlikely(*(uint32_t *)(buf[inbuf_ofs]) != 0x)) { - printk(KERN_WARNING Empty flash at 0x%08x ends at 0x%08x\n, - empty_start, ofs); + D1(printk(KERN_WARNING Empty flash at 0x%08x ends at 0x%08x\n, + empty_start, ofs)); if ((err = jffs2_scan_dirty_space(c, jeb, ofs-empty_start))) return err; goto scan_more; @@ -840,7 +840,7 @@ scan_more: return err; ofs += PAD(sizeof(struct jffs2_unknown_node)); } else if (jeb-first_node) { - printk(KERN_NOTICE CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n, ofs, jeb-offset); + D1(printk(KERN_NOTICE CLEANMARKER node found at 0x%08x, not first node in block (0x%08x)\n, ofs, jeb-offset)); if ((err = jffs2_scan_dirty_space(c, jeb, PAD(sizeof(struct jffs2_unknown_node) return err; ofs += PAD(sizeof(struct jffs2_unknown_node)); - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, Feb 14, 2008 at 9:31 AM, Miklos Szeredi [EMAIL PROTECTED] wrote: I deliberately not used the MS_* flags, which is currently a messy mix of things with totally different meanings. Does this solve all the issues? We should add a size parameter either in the mount_params or as a final argument, for future extensibility. OK, let's add it to mount_params then. And we might as well include MNT_READONLY in the API on the assumption that per-mount readonly will be available soon. Right. That patch-set should already have been merged into 2.6.25... Miklos - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
- embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix.patch removed from -mm tree
The patch titled embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix has been removed from the -mm tree. Its filename was embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix.patch This patch was dropped because it was folded into embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ -- Subject: embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix From: Andrew Morton [EMAIL PROTECTED] Cc: linux-fsdevel@vger.kernel.org Cc: Al Viro [EMAIL PROTECTED] Cc: Andreas Gruenbacher [EMAIL PROTECTED] Cc: Christoph Hellwig [EMAIL PROTECTED] Cc: Jan Blunck [EMAIL PROTECTED] Cc: Steven French [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- fs/cifs/cifs_dfs_ref.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff -puN fs/cifs/cifs_dfs_ref.c~embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix fs/cifs/cifs_dfs_ref.c --- a/fs/cifs/cifs_dfs_ref.c~embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt-cifs-fix +++ a/fs/cifs/cifs_dfs_ref.c @@ -259,18 +259,18 @@ static int add_mount_helper(struct vfsmo int err; mntget(newmnt); - err = do_add_mount(newmnt, nd, nd-mnt-mnt_flags, mntlist); + err = do_add_mount(newmnt, nd, nd-path.mnt-mnt_flags, mntlist); switch (err) { case 0: - dput(nd-dentry); - mntput(nd-mnt); - nd-mnt = newmnt; - nd-dentry = dget(newmnt-mnt_root); + dput(nd-path.dentry); + mntput(nd-path.mnt); + nd-path.mnt = newmnt; + nd-path.dentry = dget(newmnt-mnt_root); break; case -EBUSY: /* someone else made a mount here whilst we were busy */ - while (d_mountpoint(nd-dentry) - follow_down(nd-mnt, nd-dentry)) + while (d_mountpoint(nd-path.dentry) + follow_down(nd-path.mnt, nd-path.dentry)) ; err = 0; default: @@ -307,8 +307,8 @@ cifs_dfs_follow_mountpoint(struct dentry xid = GetXid(); - dput(nd-dentry); - nd-dentry = dget(dentry); + dput(nd-path.dentry); + nd-path.dentry = dget(dentry); cifs_sb = CIFS_SB(dentry-d_inode-i_sb); ses = cifs_sb-tcon-ses; @@ -340,7 +340,8 @@ cifs_dfs_follow_mountpoint(struct dentry rc = -EINVAL; goto out_err; } - mnt = cifs_dfs_do_refmount(nd-mnt, nd-dentry, + mnt = cifs_dfs_do_refmount(nd-path.mnt, + nd-path.dentry, referrals[i].node_name); cFYI(1, (%s: cifs_dfs_do_refmount:%s , mnt:%p, __FUNCTION__, @@ -357,7 +358,7 @@ cifs_dfs_follow_mountpoint(struct dentry if (IS_ERR(mnt)) goto out_err; - nd-mnt-mnt_flags |= MNT_SHRINKABLE; + nd-path.mnt-mnt_flags |= MNT_SHRINKABLE; rc = add_mount_helper(mnt, nd, cifs_dfs_automount_list); out: _ Patches currently in -mm which might be from [EMAIL PROTECTED] are softlockup-workaround.patch include-linux-remove-all-users-of-fastcall-macro.patch fs-smbfs-inodec-fix-warning-message-deprecating-smbfs.patch smack-check-for-struct-socket-with-null-sk.patch acpi-enable-c3-power-state-on-dell-inspiron-8200.patch git-audit-printk-warning-fix.patch git-cifs.patch drivers-pcmcia-i82092c-fix-up-after-pci_bus_region-changes.patch git-drm.patch git-dvb.patch git-dvb-someone-broke-the-gpio-includes.patch git-hwmon.patch adt7473-new-driver-for-analog-devices-adt7473-sensor-chip.patch drivers-input-touchscreen-ads7846c-fix-uninitialized-var-warning.patch git-kvm.patch fix-ide-mm-ide-remove-broken-dangerous-ide-unregister-scan-hwif-ioctls.patch git-net.patch 3c509-convert-to-isa_driver-and-pnp_driver-v4-cleanup.patch update-smc91x-driver-with-arm-versatile-board-info.patch cleanup-gregkh-pci-pci-fix-bus-resource-assignment-on-32-bits-with-64b-resources.patch quirks-set-en-bit-of-msi-mapping-for-devices-onht-based-nvidia-platform.patch git-sched.patch git-sched-fixup.patch git-sh.patch git-scsi-rc-fixes.patch scsi-fix-data-corruption-caused-by-ses-checkpatch-fixes.patch scsi-aic94xx-cleanups.patch libsas-convert-ata-bridge-to-use-new-eh.patch git-block-git-conflicts.patch git-sparc64.patch git-unionfs.patch drivers-usb-storage-sddr55c-fix-uninitialized-var-warnings.patch usb-ohci-sm501-driver-v2-fix.patch drivers-usb-serial-io_tic-remove-pointless-eye-candy-in-debug-statements.patch git-watchdog.patch git-watchdog-git-conflicts.patch git-x86.patch
Re: [PATCH] Add MS_BIND_FLAGS mount flag
On Thu, 2008-02-14 at 23:18 +0100, Miklos Szeredi wrote: I understand perfectly that this is what you want to do. And I'm saying that the following code snippet should do exactly the same, without having to add a new syscall: char tmpbuf[64]; sprintf(tmpbuf, /proc/self/fd/%i, fd); mount(dev_name, tmpbuf, type, flags, data); [ You could actually try to read people's responses, instead of immediately assuming they don't understand :-/ ] I did read your reply, but the follow-link magic that is performed in proc_fd_link() wasn't immediately obvious to someone who is unfamiliar with that code. I understand where you're coming from now. Anyhow, that does indeed look as if it will do what is needed for the automounter. Trond - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 06/10] Introduce path_put()
From: Jan Blunck [EMAIL PROTECTED] * Add path_put() functions for releasing a reference to the dentry and vfsmount of a struct path in the right order * Switch from path_release(nd) to path_put(nd-path) * Rename dput_path() to path_put_conditional() [EMAIL PROTECTED]: fix cifs] Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Cc: linux-fsdevel@vger.kernel.org Cc: Al Viro [EMAIL PROTECTED] Cc: Steven French [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/alpha/kernel/osf_sys.c |2 arch/mips/kernel/sysirix.c |6 - arch/parisc/hpux/sys_hpux.c |2 arch/powerpc/platforms/cell/spufs/syscalls.c |2 arch/sparc64/solaris/fs.c|4 - drivers/md/dm-table.c|2 drivers/mtd/mtdsuper.c |4 - fs/afs/mntpt.c |2 fs/autofs4/root.c|2 fs/block_dev.c |2 fs/cifs/cifs_dfs_ref.c |2 fs/coda/pioctl.c |4 - fs/compat.c |4 - fs/configfs/symlink.c|4 - fs/dquot.c |2 fs/ecryptfs/main.c |2 fs/exec.c|4 - fs/ext3/super.c |4 - fs/ext4/super.c |4 - fs/gfs2/ops_fstype.c |2 fs/inotify_user.c|4 - fs/namei.c | 56 + fs/namespace.c | 20 +++--- fs/nfs/namespace.c |2 fs/nfsctl.c |2 fs/nfsd/export.c | 10 +-- fs/nfsd/nfs4recover.c|2 fs/nfsd/nfs4state.c |2 fs/open.c| 22 +++--- fs/proc/base.c |2 fs/reiserfs/super.c |8 +- fs/stat.c|6 - fs/utimes.c |2 fs/xattr.c | 16 ++-- fs/xfs/linux-2.6/xfs_ioctl.c |2 include/linux/namei.h|1 include/linux/path.h |2 kernel/audit_tree.c | 12 +-- kernel/auditfilter.c |4 - net/sunrpc/rpc_pipe.c|2 net/unix/af_unix.c |6 - 41 files changed, 125 insertions(+), 118 deletions(-) diff -puN arch/alpha/kernel/osf_sys.c~introduce-path_put arch/alpha/kernel/osf_sys.c --- a/arch/alpha/kernel/osf_sys.c~introduce-path_put +++ a/arch/alpha/kernel/osf_sys.c @@ -260,7 +260,7 @@ osf_statfs(char __user *path, struct osf retval = user_path_walk(path, nd); if (!retval) { retval = do_osf_statfs(nd.path.dentry, buffer, bufsiz); - path_release(nd); + path_put(nd.path); } return retval; } diff -puN arch/mips/kernel/sysirix.c~introduce-path_put arch/mips/kernel/sysirix.c --- a/arch/mips/kernel/sysirix.c~introduce-path_put +++ a/arch/mips/kernel/sysirix.c @@ -711,7 +711,7 @@ asmlinkage int irix_statfs(const char __ } dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } @@ -1385,7 +1385,7 @@ asmlinkage int irix_statvfs(char __user error |= __put_user(0, buf-f_fstr[i]); dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } @@ -1636,7 +1636,7 @@ asmlinkage int irix_statvfs64(char __use error |= __put_user(0, buf-f_fstr[i]); dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } diff -puN arch/parisc/hpux/sys_hpux.c~introduce-path_put arch/parisc/hpux/sys_hpux.c --- a/arch/parisc/hpux/sys_hpux.c~introduce-path_put +++ a/arch/parisc/hpux/sys_hpux.c @@ -222,7 +222,7 @@ asmlinkage long hpux_statfs(const char _ error = vfs_statfs_hpux(nd.path.dentry, tmp); if (!error copy_to_user(buf, tmp, sizeof(tmp))) error = -EFAULT; - path_release(nd); + path_put(nd.path); } return error; } diff -puN arch/powerpc/platforms/cell/spufs/syscalls.c~introduce-path_put arch/powerpc/platforms/cell/spufs/syscalls.c --- a/arch/powerpc/platforms/cell/spufs/syscalls.c~introduce-path_put +++ a/arch/powerpc/platforms/cell/spufs/syscalls.c @@ -73,7 +73,7 @@ static long do_spu_create(const char __u
Re: [patch 00/10] mount ownership and unprivileged mount syscall (v8)
On Tue, 05 Feb 2008 22:36:16 +0100 Miklos Szeredi [EMAIL PROTECTED] wrote: Just documentation updates, compared to the previous submission. Thanks to Serge for the relentless reviews :) Please consider for -mm, and then for 2.6.26. Linus has just merged all the VFS renaming patches, so the decks are clear for looking at this work. However David and Christoph are beavering away on the r-o-bind-mounts patches and I expect that there will be overlaps with unprivileged mounts. Could we coordinate things a bit please? Decide who goes first, review and maybe even test each others work, etc? Thanks. - To unsubscribe from this list: send the line unsubscribe linux-fsdevel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
- introduce-path_put.patch removed from -mm tree
The patch titled Introduce path_put() has been removed from the -mm tree. Its filename was introduce-path_put.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ -- Subject: Introduce path_put() From: Jan Blunck [EMAIL PROTECTED] * Add path_put() functions for releasing a reference to the dentry and vfsmount of a struct path in the right order * Switch from path_release(nd) to path_put(nd-path) * Rename dput_path() to path_put_conditional() [EMAIL PROTECTED]: fix cifs] Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Andreas Gruenbacher [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Cc: linux-fsdevel@vger.kernel.org Cc: Al Viro [EMAIL PROTECTED] Cc: Steven French [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/alpha/kernel/osf_sys.c |2 arch/mips/kernel/sysirix.c |6 - arch/parisc/hpux/sys_hpux.c |2 arch/powerpc/platforms/cell/spufs/syscalls.c |2 arch/sparc64/solaris/fs.c|4 - drivers/md/dm-table.c|2 drivers/mtd/mtdsuper.c |4 - fs/afs/mntpt.c |2 fs/autofs4/root.c|2 fs/block_dev.c |2 fs/cifs/cifs_dfs_ref.c |2 fs/coda/pioctl.c |4 - fs/compat.c |4 - fs/configfs/symlink.c|4 - fs/dquot.c |2 fs/ecryptfs/main.c |2 fs/exec.c|4 - fs/ext3/super.c |4 - fs/ext4/super.c |4 - fs/gfs2/ops_fstype.c |2 fs/inotify_user.c|4 - fs/namei.c | 56 + fs/namespace.c | 20 +++--- fs/nfs/namespace.c |2 fs/nfsctl.c |2 fs/nfsd/export.c | 10 +-- fs/nfsd/nfs4recover.c|2 fs/nfsd/nfs4state.c |2 fs/open.c| 22 +++--- fs/proc/base.c |2 fs/reiserfs/super.c |8 +- fs/stat.c|6 - fs/utimes.c |2 fs/xattr.c | 16 ++-- fs/xfs/linux-2.6/xfs_ioctl.c |2 include/linux/namei.h|1 include/linux/path.h |2 kernel/audit_tree.c | 12 +-- kernel/auditfilter.c |4 - net/sunrpc/rpc_pipe.c|2 net/unix/af_unix.c |6 - 41 files changed, 125 insertions(+), 118 deletions(-) diff -puN arch/alpha/kernel/osf_sys.c~introduce-path_put arch/alpha/kernel/osf_sys.c --- a/arch/alpha/kernel/osf_sys.c~introduce-path_put +++ a/arch/alpha/kernel/osf_sys.c @@ -260,7 +260,7 @@ osf_statfs(char __user *path, struct osf retval = user_path_walk(path, nd); if (!retval) { retval = do_osf_statfs(nd.path.dentry, buffer, bufsiz); - path_release(nd); + path_put(nd.path); } return retval; } diff -puN arch/mips/kernel/sysirix.c~introduce-path_put arch/mips/kernel/sysirix.c --- a/arch/mips/kernel/sysirix.c~introduce-path_put +++ a/arch/mips/kernel/sysirix.c @@ -711,7 +711,7 @@ asmlinkage int irix_statfs(const char __ } dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } @@ -1385,7 +1385,7 @@ asmlinkage int irix_statvfs(char __user error |= __put_user(0, buf-f_fstr[i]); dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } @@ -1636,7 +1636,7 @@ asmlinkage int irix_statvfs64(char __use error |= __put_user(0, buf-f_fstr[i]); dput_and_out: - path_release(nd); + path_put(nd.path); out: return error; } diff -puN arch/parisc/hpux/sys_hpux.c~introduce-path_put arch/parisc/hpux/sys_hpux.c --- a/arch/parisc/hpux/sys_hpux.c~introduce-path_put +++ a/arch/parisc/hpux/sys_hpux.c @@ -222,7 +222,7 @@ asmlinkage long hpux_statfs(const char _ error = vfs_statfs_hpux(nd.path.dentry, tmp); if (!error copy_to_user(buf, tmp, sizeof(tmp))) error = -EFAULT; - path_release(nd); +