- 11 4月, 2016 1 次提交
-
-
由 Al Viro 提交于
... and neither can ever be NULL Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 09 2月, 2016 3 次提交
-
-
由 Jan Kara 提交于
Code in udf_find_entry() and udf_readdir() used the same buffer for storing filename that was split among blocks and for the resulting filename in utf8. This worked because udf_get_filename() first internally copied the name into a different buffer and only then performed a conversion into the destination buffer. However we want to get rid of intermediate buffers so use separate buffer for converted name and name split between blocks so that we don't have the same source and destination buffer when converting split names. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Andrew Gabbasov 提交于
Actual name length restriction is 254 bytes, this is used in 'ustr' structure, and this is what fits into UDF File Ident structures. And in most cases the constant is used as UDF_NAME_LEN-2. So, it's better to just modify the constant to make it closer to reality. Also, in some cases it's useful to have a separate constant for the maximum length of file name field in CS0 encoding in UDF File Ident structures. Also, remove the unused UDF_PATH_LEN constant. Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Andrew Gabbasov 提交于
Make the desired output length a parameter rather than have it hard-coded to UDF_NAME_LEN. Although all call sites still have this length the same, this parameterization will make the function more universal and also consistent with udf_get_filename. Signed-off-by: NAndrew Gabbasov <andrew_gabbasov@mentor.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 09 12月, 2015 1 次提交
-
-
由 Al Viro 提交于
kmap() in page_follow_link_light() needed to go - allowing to hold an arbitrary number of kmaps for long is a great way to deadlocking the system. new helper (inode_nohighmem(inode)) needs to be used for pagecache symlinks inodes; done for all in-tree cases. page_follow_link_light() instrumented to yell about anything missed. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 07 12月, 2015 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 18 5月, 2015 3 次提交
-
-
由 NeilBrown 提交于
The "fh_len" passed to ->fh_to_* is not guaranteed to be that same as that returned by encode_fh - it may be larger. With NFSv2, the filehandle is fixed length, so it may appear longer than expected and be zero-padded. So we must test that fh_len is at least some value, not exactly equal to it. Signed-off-by: NNeilBrown <neilb@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Fabian Frederick 提交于
Return appropriate error from udf_find_entry() instead of just NULL. That way we can distinguish the fact that some error happened when looking up filename (and return error to userspace) from the fact that we just didn't find the filename. Also update callers of udf_find_entry() accordingly. [JK: Improved udf_find_entry() documentation] Suggested-by: NJan Kara <jack@suse.cz> Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Fabian Frederick 提交于
Return -ENOMEM when allocation fails in udf_get_filename(). Update udf_pc_to_char(), udf_readdir(), and udf_find_entry() to handle the error appropriately. This allows us to pass appropriate error to userspace instead of corrupting symlink contents by omitting some path elements. Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 16 4月, 2015 1 次提交
-
-
由 David Howells 提交于
that's the bulk of filesystem drivers dealing with inodes of their own Signed-off-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 01 4月, 2015 1 次提交
-
-
由 Jan Kara 提交于
We failed to update ctime & mtime of a directory when new entry was created in it during rename, link, create, etc. Fix that. Reported-by: NTaesoo Kim <tsgatesv@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 14 3月, 2015 1 次提交
-
-
由 Fabian Frederick 提交于
buffer_head.h was already included in udfdecl.h Signed-off-by: NFabian Frederick <fabf@skynet.be> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 22 12月, 2014 1 次提交
-
-
由 Jan Kara 提交于
Replace repeated dereferences like dir->i_sb by storing superblock pointer in a variable and using that. Signed-off-by: NJan Kara <jack@suse.cz>
-
- 19 12月, 2014 1 次提交
-
-
由 Jan Kara 提交于
Symlink reading code does not check whether the resulting path fits into the page provided by the generic code. This isn't as easy as just checking the symlink size because of various encoding conversions we perform on path. So we have to check whether there is still enough space in the buffer on the fly. CC: stable@vger.kernel.org Reported-by: NCarl Henrik Lunde <chlunde@ping.uio.no> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 05 9月, 2014 4 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Al Viro 提交于
Currently udf_iget() (triggered by NFS) can race with udf_new_inode() leading to two inode structures with the same inode number: nfsd: iget_locked() creates inode nfsd: try to read from disk, block on that. udf_new_inode(): allocate inode with that inumber udf_new_inode(): insert it into icache, set it up and dirty udf_write_inode(): write inode into buffer cache nfsd: get CPU again, look into buffer cache, see nice and sane on-disk inode, set the in-core inode from it Fix the problem by putting inode into icache in locked state (I_NEW set) and unlocking it only after it's fully set up. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Al Viro 提交于
boilerplate code in udf_{create,mknod,symlink} taken to new helper symlink case converted to unique id calculated by udf_new_inode() - no point finding a new one. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Currently __udf_read_inode() wasn't returning anything and we found out whether we succeeded reading inode by checking whether inode is bad or not. udf_iget() returned NULL on failure and inode pointer otherwise. Make these two functions properly propagate errors up the call stack and use the return value in callers. Signed-off-by: NJan Kara <jack@suse.cz>
-
- 20 8月, 2014 1 次提交
-
-
由 Chao Yu 提交于
We have released the ->i_data_sem before invoking udf_add_entry(), so in following error path, we should not release this lock again. Signed-off-by: NChao Yu <chao2.yu@samsung.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 24 12月, 2013 1 次提交
-
-
由 Jan Kara 提交于
Lockdep is complaining about UDF: ============================================= [ INFO: possible recursive locking detected ] 3.12.0+ #16 Not tainted --------------------------------------------- ln/7386 is trying to acquire lock: (&ei->i_data_sem){+.+...}, at: [<ffffffff8142f06d>] udf_get_block+0x8d/0x130 but task is already holding lock: (&ei->i_data_sem){+.+...}, at: [<ffffffff81431a8d>] udf_symlink+0x8d/0x690 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ei->i_data_sem); lock(&ei->i_data_sem); *** DEADLOCK *** This is because we hold i_data_sem of the symlink inode while calling udf_add_entry() for the directory. I don't think this can ever lead to deadlocks since we never hold i_data_sem for two inodes in any other place. The fix is simple - move unlock of i_data_sem for symlink inode up. We don't need it for anything when linking symlink inode to directory. Reported-by: NChristoph Hellwig <hch@infradead.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 29 6月, 2013 1 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 26 2月, 2013 1 次提交
-
-
由 Namjae Jeon 提交于
This patch is a follow up on below patch: [PATCH] exportfs: add FILEID_INVALID to indicate invalid fid_type commit: 216b6cbdSigned-off-by: NNamjae Jeon <namjae.jeon@samsung.com> Signed-off-by: NVivek Trivedi <t.vivek@samsung.com> Acked-by: NSteven Whitehouse <swhiteho@redhat.com> Acked-by: NSage Weil <sage@inktank.com> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 14 7月, 2012 2 次提交
-
-
由 Al Viro 提交于
boolean "does it have to be exclusive?" flag is passed instead; Local filesystem should just ignore it - the object is guaranteed not to be there yet. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
Just the flags; only NFS cares even about that, but there are legitimate uses for such argument. And getting rid of that completely would require splitting ->lookup() into a couple of methods (at least), so let's leave that alone for now... Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 13 7月, 2012 1 次提交
-
-
由 Mathias Krause 提交于
For type 0x51 the udf.parent_partref member in struct fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: NMathias Krause <minipli@googlemail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 30 5月, 2012 1 次提交
-
-
由 Al Viro 提交于
pass inode + parent's inode or NULL instead of dentry + bool saying whether we want the parent or not. NOTE: that needs ceph fix folded in. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 11 5月, 2012 1 次提交
-
-
由 Linus Torvalds 提交于
This allows comparing hash and len in one operation on 64-bit architectures. Right now only __d_lookup_rcu() takes advantage of this, since that is the case we care most about. The use of anonymous struct/unions hides the alternate 64-bit approach from most users, the exception being a few cases where we initialize a 'struct qstr' with a static initializer. This makes the problematic cases use a new QSTR_INIT() helper function for that (but initializing just the name pointer with a "{ .name = xyzzy }" initializer remains valid, as does just copying another qstr structure). Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 21 3月, 2012 1 次提交
-
-
由 Al Viro 提交于
New field of struct super_block - ->s_max_links. Maximal allowed value of ->i_nlink or 0; in the latter case all checks still need to be done in ->link/->mkdir/->rename instances. Note that this limit applies both to directoris and to non-directories. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 04 1月, 2012 3 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
vfs_create() ignores everything outside of 16bit subset of its mode argument; switching it to umode_t is obviously equivalent and it's the only caller of the method Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Al Viro 提交于
vfs_mkdir() gets int, but immediately drops everything that might not fit into umode_t and that's the only caller of ->mkdir()... Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 02 11月, 2011 2 次提交
-
-
由 Miklos Szeredi 提交于
Replace remaining direct i_nlink updates with a new set_nlink() updater function. Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz> Tested-by: NToshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
由 Miklos Szeredi 提交于
Replace direct i_nlink updates with the respective updater function (inc_nlink, drop_nlink, clear_nlink, inode_dec_link_count). Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
-
- 11 10月, 2011 1 次提交
-
-
由 Joe Perches 提交于
Rename udf_warning to udf_warn for consistency with normal logging uses of pr_warn. Rename function udf_warning to _udf_warn. Remove __func__ from uses and move __func__ to a new udf_warn macro that calls _udf_warn. Add \n's to uses of udf_warn, remove \n from _udf_warn. Coalesce formats. Reviewed-by: NNamJae Jeon <linkinjeon@gmail.com> Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 28 5月, 2011 1 次提交
-
-
由 Sage Weil 提交于
udf does not have problems with references to unlinked directories. CC: Jan Kara <jack@suse.cz> Signed-off-by: NSage Weil <sage@newdream.net> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 26 5月, 2011 2 次提交
-
-
由 Sage Weil 提交于
Only a few file systems need this. Start by pushing it down into each rename method (except gfs2 and xfs) so that it can be dealt with on a per-fs basis. Acked-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NSage Weil <sage@newdream.net> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
由 Sage Weil 提交于
Only a few file systems need this. Start by pushing it down into each fs rmdir method (except gfs2 and xfs) so it can be dealt with on a per-fs basis. This does not change behavior for any in-tree file systems. Acked-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NSage Weil <sage@newdream.net> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 14 3月, 2011 1 次提交
-
-
由 Aneesh Kumar K.V 提交于
The exportfs encode handle function should return the minimum required handle size. This helps user to find out the handle size by passing 0 handle size in the first step and then redoing to the call again with the returned handle size value. Acked-by: NSerge Hallyn <serue@us.ibm.com> Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 03 3月, 2011 1 次提交
-
-
由 Al Viro 提交于
(256 << sizeof(x)) - 1 is not the maximal possible value of x... In reality, the maximal allowed value for UDF FileLinkCount is 65535. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
-
- 07 1月, 2011 1 次提交
-
-
由 Jesper Juhl 提交于
Hi, There's a small memory leak in fs/udf/namei.c::udf_find_entry(). We dynamically allocate memory for 'fname' with kmalloc() and in most situations we free it before we leave the function, but there is one situation where we do not (but should). This patch closes the leak by jumping to the 'out_ok' label which does the correct cleanup rather than doing half the cleanup and returning directly. Signed-off-by: NJesper Juhl <jj@chaosbits.net> Signed-off-by: NJan Kara <jack@suse.cz>
-